From 97368b7080269db274db7309ca0d07676292d644 Mon Sep 17 00:00:00 2001 From: Alexander T Date: Tue, 20 Aug 2019 10:57:23 +0300 Subject: [PATCH] remove .eslintrc from scripts --- Gulpfile.js | 14 ++++++++++---- scripts/.eslintrc.json | 3 --- 2 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 scripts/.eslintrc.json diff --git a/Gulpfile.js b/Gulpfile.js index a894480ffd5..51127f9822d 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -335,22 +335,28 @@ const lintFoldStart = async () => { if (fold.isTravis()) console.log(fold.start( const lintFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("lint")); }; const eslint = (folder) => async () => { const ESLINTRC_CI = ".eslintrc.ci.json"; - const ESLINTRC = ".eslintrc.json"; const isCIEnv = cmdLineOptions.ci || process.env.CI === "true"; - const config = isCIEnv && fs.existsSync(path.resolve(folder, ESLINTRC_CI)) ? ESLINTRC_CI : ESLINTRC; const args = [ "node_modules/eslint/bin/eslint", - "--config", `${ folder }/${ config }`, "--format", "autolinkable-stylish", "--rulesdir", "scripts/eslint/built/rules", - "--ext", ".ts", folder, + "--ext", ".ts", ]; + if ( + isCIEnv && + fs.existsSync(path.resolve(folder, ESLINTRC_CI)) + ) { + args.push("--config", path.resolve(folder, ESLINTRC_CI)); + } + if (cmdLineOptions.fix) { args.push("--fix"); } + args.push(folder); + log(`Linting: ${args.join(" ")}`); return exec(process.execPath, args); } diff --git a/scripts/.eslintrc.json b/scripts/.eslintrc.json deleted file mode 100644 index e9868f9128c..00000000000 --- a/scripts/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../.eslintrc.json" -}