From 1c833e52f88b26e66805d395f5c6edb38bb304db Mon Sep 17 00:00:00 2001 From: Ruslan Gunawardana Date: Tue, 21 Nov 2017 17:02:50 +0200 Subject: [PATCH 1/3] 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. --- template/.eslintrc.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/template/.eslintrc.js b/template/.eslintrc.js index 7844912865..53bc95988e 100644 --- a/template/.eslintrc.js +++ b/template/.eslintrc.js @@ -22,16 +22,16 @@ 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, @@ -41,12 +41,12 @@ module.exports = { {{#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 From 9eaba75447ad8c74bd93845d7f88bd7fa4936514 Mon Sep 17 00:00:00 2001 From: Ruslan Gunawardana Date: Tue, 21 Nov 2017 17:09:41 +0200 Subject: [PATCH 2/3] ESLint config is more explicit --- template/.eslintrc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template/.eslintrc.js b/template/.eslintrc.js index 53bc95988e..5583301e12 100644 --- a/template/.eslintrc.js +++ b/template/.eslintrc.js @@ -34,9 +34,9 @@ module.exports = { rules: { {{#if_eq lintConfig "standard"}} // allow paren-less arrow functions - 'arrow-parens': 0, + 'arrow-parens': 'off', // allow async-await - 'generator-star-spacing': 0, + 'generator-star-spacing': 'off', {{/if_eq}} {{#if_eq lintConfig "airbnb"}} // don't require .vue extension when importing @@ -50,6 +50,6 @@ module.exports = { }], {{/if_eq}} // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' } } From f4363017180bd9b2e9edfd4ef1560071f40b1208 Mon Sep 17 00:00:00 2001 From: Ruslan Gunawardana Date: Wed, 29 Nov 2017 20:10:37 +0200 Subject: [PATCH 3/3] 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. --- template/.eslintrc.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/template/.eslintrc.js b/template/.eslintrc.js index 5583301e12..8e8be20e8d 100644 --- a/template/.eslintrc.js +++ b/template/.eslintrc.js @@ -33,8 +33,6 @@ module.exports = { // add your custom rules here rules: { {{#if_eq lintConfig "standard"}} - // allow paren-less arrow functions - 'arrow-parens': 'off', // allow async-await 'generator-star-spacing': 'off', {{/if_eq}}