Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension does not work with new versions of eslint #763

Closed
exsesx opened this issue Mar 22, 2019 · 20 comments
Closed

Extension does not work with new versions of eslint #763

exsesx opened this issue Mar 22, 2019 · 20 comments
Labels
locked Please open a new issue and fill out the template instead of commenting.

Comments

@exsesx
Copy link

exsesx commented Mar 22, 2019

Prettier cannot resolve the eslint configuration and uses fallback options instead of eslint rules (prettier.eslintIntegration: true)

The issue is reproduced using the eslint versions:

  • 5.15.2
  • 5.15.3

The solution for me at the moment is downgrade eslint to 5.15.1

@rimatla
Copy link

rimatla commented Mar 24, 2019

Any updates? Prettier stopped working out of the blue today, I didn't update anything unless VSC updated itself under the hood.

@icyJoseph
Copy link

icyJoseph commented Mar 25, 2019

We've run into the same issue. Prettier is not applying our eslint rules.

Eslint version: 5.15.3
Prettier: 1.16.4

VS-code extension: 1.18.1

Downgrading to 5.15.1 does fix the issue.

@through-a-haze
Copy link

Same here. Downgrading eslint doesn't help. I have

"space-before-function-paren": [
      "error",
      {
        "anonymous": "always",
        "named": "never",
        "asyncArrow": "always"
      }
    ]

in my eslint rules and it used to work but today Prettier started removing spaces between "function" keyword and parentheses in anonymous functions.

@Titozzz
Copy link

Titozzz commented Mar 28, 2019

We started seeing the same issues. Any more info needed to reproduce the issue?

@bradennapier
Copy link

Same info - extension is dead?

@through-a-haze
Copy link

It seems to work again for me. Don't know why, didn't do anything.
eslint -v
v5.15.3

prettier -v
1.16.4

@jhpratt
Copy link

jhpratt commented Mar 31, 2019

Doesn't appear to work at all for me, disabling prettier until further notice. I imagine others will be doing the same.

@adrienharnay
Copy link

Downgrading to 5.15.1 does fix the issue.

As @icyJoseph said, downgrading Eslint to 5.15.1 fixes the issue.

@muhozi
Copy link

muhozi commented Apr 2, 2019

Downgrading doesn't work.

eslint -v
v5.15.1
prettier -v
1.16.4

@icyJoseph
Copy link

Downgrading doesn't work.

eslint -v
v5.15.1
prettier -v
1.16.4

Perhaps a dependency is forcing a higher version of eslint on your project? What does yarn why eslint print? Anyway, the extension should work with any version. Should we investigate what changed from 5.15.1 to 5.15.2, fix it and submit a PR?

@muhozi
Copy link

muhozi commented Apr 2, 2019

I'm using eslint 5.16.0(installed globally not in the project locally). In my case, I had this package called Beautify(hookyqr.beautify) and it was the one messing with my prettier.

In addition, other formatting packages may cause prettier not to work as expected as it was mentioned in the prettier vscode README

Screenshot 2019-04-02 at 23 41 15

@jca41
Copy link

jca41 commented Apr 5, 2019

Same problem here. After the vscode updated to 1.33.0 (osx) prettier is now applying the fallback rules.
eslint integration is enabled on settings.

@timmeade
Copy link

timmeade commented Apr 7, 2019

Adding my 2 cents . osx . stopped working with vscode 1.33.0

eslint 5.16.0 or 5.15.1 neither works.

@timmeade
Copy link

timmeade commented Apr 7, 2019

I just downgraded VSCode to Version 1.32.3 (1.32.3) and everything is working again

@exsesx
Copy link
Author

exsesx commented Apr 24, 2019

Any updates?

@CiGit
Copy link
Member

CiGit commented Apr 25, 2019

Have some of you tried with prettier-eslint's CLI with different eslint version ? Trying to narrow down the issue.

@quentez
Copy link

quentez commented Apr 27, 2019

@CiGit The prettier-eslint command works for us with ESLint 5.16.0. But not in VSCode.

@bradzacher
Copy link

Unless I'm mistaken, the problem is that this extension bundles its own version of prettier-eslint - which means it also has its own version of eslint@^4.0.0.

This means that even if you have eslint installed locally, the extension will run the lint and fixers with its local version of eslint 4.
In a lot of cases it'll work, but there are missing things (like support for scoped plugins).

At least that was what I found when I was investigating why patching in my fix locally didn't fix the extension (I had to go into the vscode extension folder and patch it there for it to work).

@ntotten
Copy link
Member

ntotten commented Aug 12, 2019

Duplicate of #870

@ntotten ntotten marked this as a duplicate of #870 Aug 12, 2019
@ntotten ntotten closed this as completed Aug 12, 2019
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the locked Please open a new issue and fill out the template instead of commenting. label Apr 12, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests