-
Notifications
You must be signed in to change notification settings - Fork 815
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
Replace jshint with eslint #11915
Replace jshint with eslint #11915
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: April 29, 2019. |
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: August 6, 2019. |
simison, Your synced wpcom patch D29957-code has been updated. |
1 similar comment
simison, Your synced wpcom patch D29957-code has been updated. |
simison, Your synced wpcom patch D29957-code has been updated. |
1 similar comment
simison, Your synced wpcom patch D29957-code has been updated. |
simison, Your synced wpcom patch D29957-code has been updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. I think it would be nice to merge it as is, and then fix all the current es6 and es5 warnings in a follow-up PR, and then update the rules to match WordPress', so we don't add more warnings in the future:
https://github.com/WordPress/gutenberg/blob/4905299edfb1f652229daea695fe196b55d0bf76/packages/eslint-plugin/configs/jshint.js
This is going to need a rebase first though. I took care of that. Will merge when the tests pass.
Replace jshint with eslint. Just a quick stint, mostly deleted files and plugged some overrides to eslint config to see if this would be easy or complicated.
Complications come mostly from the fact that ES5 and ES6 files are mixed up in different folders, specifically
_inc
which has both.Moving old JS files out from
_inc
would probably make this much easier.Resolves #11914
Changes proposed in this Pull Request:
Added a ES5 eslint config file which is used for linting both
modules/**
and_inc/*
(! not **) files, also fixed some linting errors in few files.Might be a good idea to switch some of the rules from
warn
toerror
and fix these issues too.TODO:
@wordpress/eslint-plugin
Testing instructions:
yarn lint
oryarn lint-es6 && yarn lint-es5
Proposed changelog entry for your changes: