-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
ESLint config clean up #1093
Merged
Merged
ESLint config clean up #1093
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since we're using .js config we are already abusing JS object literal brevity in other fields. Unquoting these fields brings consistency to ESLint config.
gucong3000
approved these changes
Nov 27, 2017
Remove ESLint 'arrow-parens' rule for StandardJS. StandardJS don't define this rule. So it's redundant to specify it's ignorance explicitly.
LinusBorg
approved these changes
Dec 2, 2017
Thanks |
LinusBorg
added a commit
that referenced
this pull request
Dec 2, 2017
* develop: bump version 1.2.5 some small updates to the docs Adds support for the video poster attribute (#1123) babel-register use only for e2e tests (#1120) Update project creation: sort dependencies in package.json (#1118) Fix bug from PR #1082 FIX: convert env variable PORT to a number. Minor refactoring of build scripts (#1082) ESLint config clean up (#1093) Switch to uglifyjs-webpack-plugin (#1119) change bad spaces into normal spaces and removing trailing space (#1132) prevent empty line when unit = y & e2e = n Update meta.js (#1091) docs(README): Update usage to init from develop branch (#1092) Use actual host for notification (#1101). (#1103) prevent webpack from injecting useless mocks
frandiox
pushed a commit
to OnsenUI/vue-cordova-webpack
that referenced
this pull request
Dec 25, 2017
* Remove unnecessary quotes from .eslintrc.js Since we're using .js config we are already abusing JS object literal brevity in other fields. Unquoting these fields brings consistency to ESLint config. * ESLint config is more explicit * Remove redundant rule for ESLint Standard JS Remove ESLint 'arrow-parens' rule for StandardJS. StandardJS don't define this rule. So it's redundant to specify it's ignorance explicitly.
shenron
pushed a commit
to shenron/webpack
that referenced
this pull request
Mar 20, 2018
* Remove unnecessary quotes from .eslintrc.js Since we're using .js config we are already abusing JS object literal brevity in other fields. Unquoting these fields brings consistency to ESLint config. * ESLint config is more explicit * Remove redundant rule for ESLint Standard JS Remove ESLint 'arrow-parens' rule for StandardJS. StandardJS don't define this rule. So it's redundant to specify it's ignorance explicitly.
shenron
pushed a commit
to shenron/webpack
that referenced
this pull request
Mar 20, 2018
* develop: bump version 1.2.5 some small updates to the docs Adds support for the video poster attribute (vuejs-templates#1123) babel-register use only for e2e tests (vuejs-templates#1120) Update project creation: sort dependencies in package.json (vuejs-templates#1118) Fix bug from PR vuejs-templates#1082 FIX: convert env variable PORT to a number. Minor refactoring of build scripts (vuejs-templates#1082) ESLint config clean up (vuejs-templates#1093) Switch to uglifyjs-webpack-plugin (vuejs-templates#1119) change bad spaces into normal spaces and removing trailing space (vuejs-templates#1132) prevent empty line when unit = y & e2e = n Update meta.js (vuejs-templates#1091) docs(README): Update usage to init from develop branch (vuejs-templates#1092) Use actual host for notification (vuejs-templates#1101). (vuejs-templates#1103) prevent webpack from injecting useless mocks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've checked the
.eslintrc.js
configuration and found 2 ways to make it even better.1. Remove unnecessary quotes from fields
Since we're using .js config we are already abusing JS object literal brevity in other fields. Unquoting these fields brings consistency to ESLint config.
2. Use more explicit ESLint rule settings
Some users of the template are not experts in ESLint configuration. So they might want to dig in and check what's under the hood. I think that using explicit
'error'
'warn'
and'off'
should be preferred over2
,1
and0
in this template. These values are taken from ESLint configuration guide.3. Remove redundand
'arrow-parens': 'off'
Also it was weird to find
'arrow-parens': 'off'
in ESLint config (when Standard JS option was selected during project initialization). Standard JS don't specify this rule, so the line has no effect. I think that this line should affect other supported code styles. So I think that we should exclude'arrow-parens': 'off'
ifStandard JS
was selected as code style option.Additional suggestions
While checking the ESLint config I've found that it was desided to disable Standard JS
'generator-star-spacing'
. I wounder why does non-standard code style is encouraged. I think that it's legacy from older Standard JS versions or some other code style. I suggest to remove the line that disables'generator-star-spacing'
for Standard JS.