From 9a7a18543ae6237fba2b758ee9032501bf15f109 Mon Sep 17 00:00:00 2001 From: Chris Barth Date: Thu, 13 Jul 2023 22:28:34 -0400 Subject: [PATCH] Move eslint `env` config to .eslintrc --- .eslintrc => .eslintrc.yaml | 27 ++++++++++++--------------- gulpfile.js | 3 --- 2 files changed, 12 insertions(+), 18 deletions(-) rename .eslintrc => .eslintrc.yaml (79%) diff --git a/.eslintrc b/.eslintrc.yaml similarity index 79% rename from .eslintrc rename to .eslintrc.yaml index a8dfaf97..7c2c3538 100644 --- a/.eslintrc +++ b/.eslintrc.yaml @@ -1,5 +1,7 @@ parser: babel-eslint env: + node: true + mocha: true es6: true parserOptions: ecmaVersion: 6 @@ -21,8 +23,7 @@ rules: indent: - error - 4 - - - SwitchCase: 1 + - SwitchCase: 1 space-before-function-paren: - error - never @@ -33,9 +34,8 @@ rules: consistent-return: error no-multiple-empty-lines: - error - - - max: 1 - maxBOF: 0 + - max: 1 + maxBOF: 0 no-lonely-if: error new-parens: error eol-last: error @@ -45,20 +45,17 @@ rules: - as-needed prefer-arrow-callback: - error - - - allowNamedFunctions: true + - allowNamedFunctions: true prefer-destructuring: - error - - - object: true - array: false + - object: true + array: false prefer-spread: error prefer-rest-params: error prefer-promise-reject-errors: 0 valid-typeof: 0 overrides: - - - files: - - "*.spec.js" - env: - mocha: true + - files: + - "*.spec.js" + env: + mocha: true diff --git a/gulpfile.js b/gulpfile.js index 25f777b7..5e3923bf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -27,9 +27,6 @@ gulp.task('lint', () => { .pipe( eslint({ fix: true, - envs: [ - 'node' - ] }) ) .pipe(eslint.format())