diff --git a/Gulpfile.js b/Gulpfile.js index 78116ba963f..a894480ffd5 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -336,7 +336,7 @@ const lintFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("lin const eslint = (folder) => async () => { const ESLINTRC_CI = ".eslintrc.ci.json"; const ESLINTRC = ".eslintrc.json"; - const isCIEnv = process.env.CI === "true"; + const isCIEnv = cmdLineOptions.ci || process.env.CI === "true"; const config = isCIEnv && fs.existsSync(path.resolve(folder, ESLINTRC_CI)) ? ESLINTRC_CI : ESLINTRC; const args = [ @@ -364,11 +364,17 @@ const lintCompiler = eslint("src"); lintCompiler.displayName = "lint-compiler"; task("lint-compiler", series([buildEslintRules, lintFoldStart, lintCompiler, lintFoldEnd])); task("lint-compiler").description = "Runs eslint on the compiler sources."; +task("lint-compiler").flags = { + " --ci": "Runs eslint additional rules", +}; const lint = series([buildEslintRules, lintFoldStart, lintScripts, lintCompiler, lintFoldEnd]); lint.displayName = "lint"; task("lint", series([buildEslintRules, lintFoldStart, lint, lintFoldEnd])); task("lint").description = "Runs eslint on the compiler and scripts sources."; +task("lint").flags = { + " --ci": "Runs eslint additional rules", +}; const buildCancellationToken = () => buildProject("src/cancellationToken"); const cleanCancellationToken = () => cleanProject("src/cancellationToken"); diff --git a/package.json b/package.json index 89c60921552..30580342598 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ "gulp": "gulp", "jake": "gulp", "lint": "gulp lint", + "lint:ci": "gulp lint --ci", "lint:compiler": "gulp lint-compiler", "lint:scripts": "gulp lint-scripts", "setup-hooks": "node scripts/link-hooks.js",