Skip to content

Commit 97368b7

Browse files
committed
remove .eslintrc from scripts
1 parent 383750c commit 97368b7

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Gulpfile.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,22 +335,28 @@ const lintFoldStart = async () => { if (fold.isTravis()) console.log(fold.start(
335335
const lintFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("lint")); };
336336
const eslint = (folder) => async () => {
337337
const ESLINTRC_CI = ".eslintrc.ci.json";
338-
const ESLINTRC = ".eslintrc.json";
339338
const isCIEnv = cmdLineOptions.ci || process.env.CI === "true";
340-
const config = isCIEnv && fs.existsSync(path.resolve(folder, ESLINTRC_CI)) ? ESLINTRC_CI : ESLINTRC;
341339

342340
const args = [
343341
"node_modules/eslint/bin/eslint",
344-
"--config", `${ folder }/${ config }`,
345342
"--format", "autolinkable-stylish",
346343
"--rulesdir", "scripts/eslint/built/rules",
347-
"--ext", ".ts", folder,
344+
"--ext", ".ts",
348345
];
349346

347+
if (
348+
isCIEnv &&
349+
fs.existsSync(path.resolve(folder, ESLINTRC_CI))
350+
) {
351+
args.push("--config", path.resolve(folder, ESLINTRC_CI));
352+
}
353+
350354
if (cmdLineOptions.fix) {
351355
args.push("--fix");
352356
}
353357

358+
args.push(folder);
359+
354360
log(`Linting: ${args.join(" ")}`);
355361
return exec(process.execPath, args);
356362
}

scripts/.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)