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

Does it support eslint 6? #4

Closed
blueandhack opened this issue Aug 9, 2019 · 10 comments
Closed

Does it support eslint 6? #4

blueandhack opened this issue Aug 9, 2019 · 10 comments

Comments

@blueandhack
Copy link

blueandhack commented Aug 9, 2019

I tried to upgrade eslint to 6, and I enable "prettier.eslintIntegration": true,. (Because I use it for format React project.)
I got error

8/9/2019, 2:50:04 AM:
---------------------
Failed to load prettier from undefined. Using bundled.

8/9/2019, 2:50:04 AM:
---------------------
Cannot find module './utils/ast-utils'
// this is my dev dependencies packages
  "devDependencies": {
    "@babel/node": "^7.5.5",
    "babel-plugin-transform-runtime": "^6.23.0",
    "core-js": "^3.1.4",
    "eslint": "6.1.0",
    "eslint-config-standard": "^13.0.1",
    "eslint-plugin-import": "^2.18.2",
    "eslint-plugin-node": "^9.1.0",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-standard": "^4.0.0",
    "nodemon": "^1.19.1",
    "prettier": "1.18.2"
  }
@svipas
Copy link
Owner

svipas commented Aug 9, 2019

It doesn't support ESLint 6 because of https://github.com/prettier/prettier-eslint it even contains this issue: prettier/prettier-eslint#222. But I can fork it and fix it and I guess I will do it pretty soon. Stay tuned :) And for now as a workaround use 5.16.0 version of ESLint

@svipas
Copy link
Owner

svipas commented Sep 24, 2019

@blueandhack Seems like prettier-eslint will support ESLint 6 very soon. You can take a look at PR and comments: prettier/prettier-eslint#236

Lets wait this week, if they will do nothing I will fork and upgrade ESLint to 6 version by myself.

@kevinfaveri
Copy link

Do you plan on forking this plugin @svipas?

@svipas
Copy link
Owner

svipas commented Oct 7, 2019

@kevinfaguiar Yes, I'm planning a big release this week. Stay tuned!

@blueandhack
Copy link
Author

@svipas Has any progress been made on this?

@svipas
Copy link
Owner

svipas commented Nov 18, 2019

I updated prettier-eslint to 9.0.1 and released new version of this extension which is now 3.3.0 could you please check if now ESLint 6 works for you?

/cc @blueandhack @devrdias @quentez @ben-rogerson @kevinfaguiar @namelesswc @khuongduybui @xEcEz

@Austaras
Copy link

Austaras commented Nov 23, 2019

@svipas It works.

There is one minor issue that in this plugin process.cwd() is ~ so typescript-eslint parser doesn't work(its default root resolves to process.cwd())

@svipas
Copy link
Owner

svipas commented Nov 23, 2019

Since it works I will close this issue, but what I can see it really makes sense to fork that repo and fix all issues with ESLint 6 since it's not very maintainable.

Also, what I suggest is to do not use these integrations and just use eslint.autoFix or tslint.autoFix and you will not have any problems with any ESLint version, etc.

@svipas svipas closed this as completed Nov 23, 2019
@Austaras
Copy link

@svipas what about auto eslint fix use vscode-eslint plugin when format? IIRC it's possible and it's more performant, and you don't need to rely on prettier-eslint anymore. The only downside is you cannot have some prettier feature disabled but I guess that's a minor problem?

@svipas
Copy link
Owner

svipas commented Nov 24, 2019

I kept integrations because people want them, but I personally use ESLint plugin and set eslint.autoFix to true. This way I can format any ESLint version and it's faster and works as expected, first formatted by Prettier then auto-fixed by ESLint. Yeah you're right if you disable for e.g. semi in Prettier you should do the same in ESLint, with eslintIntegration you don't need to do that I guess. Anyways, I will keep these integrations and I will fix issues related to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants