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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade eslint to 7.x #1794
upgrade eslint to 7.x #1794
Conversation
So, was able to work on it today:
Still two points open:
|
eslint/rfcs#47 may have ramifications for users, we'll need to determine how and document migration steps if necessary |
Agreed. Until now, I see following potential ramifications:
It definitely feels like a major change, with breaking changes (ie removal of babel-eslint). How do you guys want to document this? Should we add a section in the README? |
BREAKING CHANGE: for a guide to migrate your code to eslint 7.x, as well as a list of breaking changes, please refer to: - https://eslint.org/docs/user-guide/migrating-to-6.0.0 - https://eslint.org/docs/user-guide/migrating-to-7.0.0 Additionally, this change also removes the usage of `babel-eslint`. For most projects, this should work transparently. However, if your code specifically references one of its rules, you can: - add `@babel/eslint-parser` to your devDependencies or - remove the references, as some of the rules have been merged into eslint
I've marked the initial commit as a breaking change, and also added more info how to migrate to eslint 7.x in the commit. This info will be added by Lerna in the changelog. Please let me know if we need anything else. 馃槉 @bennypowers @LarsDenBakker |
Hey @bennypowers, have you had some time to review the info I鈥檝e added? 馃檲 Let me know if something else is needed! |
I'm satisfied, /me tosses the ball to @LarsDenBakker |
If I understand it correctly, the changed approach by plugin loading in eslint requires users to install the plugins on their own. That's why the peer deps were added #1740. Do we need to include some instructions for users in the readme? The other thing is that we need to update the project generator, but that's something for after this gets released. |
Just reviewed the documentation of eslint's 7.x migration on this topic (https://eslint.org/docs/user-guide/migrating-to-7.0.0#plugin-resolution-has-been-updated) They mention that for most cases, the fact of loading plugins relatively from the entry configuration file instead of the current working dir, should not change anything. So, one might ask: what are the rare cases? Taking this into account, I think it should be enough to just mention the migration guides like we currently do. That way, if users encounter errors, they will be able to follow the guides. |
Sounds good then |
This PR aims to upgrade eslint to 7.x. This will solve issues like: babel/eslint-plugin-babel#196
Some remarks:
babel-eslint
was used to support optional chaining. This is now in the spec, so eslint support this natively. Should this update to@open-wc/eslint-config
be considered as breaking? If users used eslint comments to control the babel rules, it will break their linting.