Remove js-beautify and improve ESLint config #590
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
examples/
(for features)What kind of change does this PR introduce?
What is the current behavior? (You can also link to an open issue here)
Before, there were two linters doing the same thing: linting and fixing lint errors. There were also two commands for this,
npm run lint
andnpm run beautify-lint
.ESLint has gotten extremely popular (especially since JSCS was merged into ESLint) and is very actively developed, so it makes sense to move over to ESLint. Many people also have ESLint setup in their editor.
What is the new behavior?
Now, there is only one linter, ESLint. The js-beautify config is merged in the ESLint config
as best as I could do. There is almost no documentation about the rules of js-beautify,
so this was a bit hard.
ESLint was updated to v3, which provides many powerful rules, and auto-fixing of some rules (with
npm run beautify
).npm run beautify-lint
was removed, becausenpm run lint
does the same now (which makes sense).Does this PR introduce a breaking change?
If this PR contains a breaking change, please describe the following...
Other information:
I also checked the new ESLint config against the main webpack repo, and adjusted the rules accordingly. This config finds about ~ 50 new errors in the main repo, but these are all very valid (e.g. dead code, inconsistent code style). Optionally, I could update the main webpack repo after this.
Another interesting thing to do would be to make a new repo with this config,
eslint-config-webpack
. But that's outside the scope of this PR for now.Pinging @TheLarkInn for review.