Skip to content

Commit d0850da

Browse files
exarusfrandiox
authored andcommitted
ESLint config clean up (vuejs-templates#1093)
* 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.
1 parent 5f16e02 commit d0850da

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

template/.eslintrc.js

+9-11
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,32 @@ module.exports = {
2222
],
2323
{{#if_eq lintConfig "airbnb"}}
2424
// check if imports actually resolve
25-
'settings': {
25+
settings: {
2626
'import/resolver': {
27-
'webpack': {
28-
'config': 'build/webpack.base.conf.js'
27+
webpack: {
28+
config: 'build/webpack.base.conf.js'
2929
}
3030
}
3131
},
3232
{{/if_eq}}
3333
// add your custom rules here
34-
'rules': {
34+
rules: {
3535
{{#if_eq lintConfig "standard"}}
36-
// allow paren-less arrow functions
37-
'arrow-parens': 0,
3836
// allow async-await
39-
'generator-star-spacing': 0,
37+
'generator-star-spacing': 'off',
4038
{{/if_eq}}
4139
{{#if_eq lintConfig "airbnb"}}
4240
// don't require .vue extension when importing
4341
'import/extensions': ['error', 'always', {
44-
'js': 'never',
45-
'vue': 'never'
42+
js: 'never',
43+
vue: 'never'
4644
}],
4745
// allow optionalDependencies
4846
'import/no-extraneous-dependencies': ['error', {
49-
'optionalDependencies': ['test/unit/index.js']
47+
optionalDependencies: ['test/unit/index.js']
5048
}],
5149
{{/if_eq}}
5250
// allow debugger during development
53-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
51+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
5452
}
5553
}

0 commit comments

Comments
 (0)