Skip to content

Commit

Permalink
ESLint config clean up (#1093)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
exarus authored and LinusBorg committed Dec 2, 2017
1 parent c408224 commit 5ac6d62
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions template/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,32 @@ module.exports = {
],
{{#if_eq lintConfig "airbnb"}}
// check if imports actually resolve
'settings': {
settings: {
'import/resolver': {
'webpack': {
'config': 'build/webpack.base.conf.js'
webpack: {
config: 'build/webpack.base.conf.js'
}
}
},
{{/if_eq}}
// add your custom rules here
'rules': {
rules: {
{{#if_eq lintConfig "standard"}}
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
'generator-star-spacing': 'off',
{{/if_eq}}
{{#if_eq lintConfig "airbnb"}}
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
'js': 'never',
'vue': 'never'
js: 'never',
vue: 'never'
}],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
'optionalDependencies': ['test/unit/index.js']
optionalDependencies: ['test/unit/index.js']
}],
{{/if_eq}}
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}

0 comments on commit 5ac6d62

Please sign in to comment.