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.