remove .eslintrc from scripts

This commit is contained in:
Alexander T 2019-08-20 10:57:23 +03:00
parent 383750c9da
commit 97368b7080
2 changed files with 10 additions and 7 deletions

View file

@ -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);
}

View file

@ -1,3 +0,0 @@
{
"extends": "../.eslintrc.json"
}