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" -}