Retain the original eslint arg order (#39450)

This commit is contained in:
Orta Therox 2020-07-06 16:02:56 -04:00 committed by GitHub
parent 64696225ab
commit 17d8b02796
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 9 deletions

View file

@ -350,10 +350,12 @@ const lintFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("lin
/** @type { (folder: string) => { (): Promise<any>; displayName?: string } } */
const eslint = (folder) => async () => {
const formatter = cmdLineOptions.ci ? "stylish" : "autolinkable-stylish";
const args = [
"node_modules/eslint/bin/eslint",
"--cache",
"--cache-location", `${folder}/.eslintcache`,
"--format", formatter,
"--rulesdir", "scripts/eslint/built/rules",
"--ext", ".ts",
];
@ -362,14 +364,6 @@ const eslint = (folder) => async () => {
args.push("--fix");
}
// Use stylish format on CI, so that it can be picked up by GH Action's rule matchers
if (cmdLineOptions.ci) {
args.push("--format", "stylish");
}
else {
args.push("--format", "autolinkable-stylish");
}
args.push(folder);
log(`Linting: ${args.join(" ")}`);

View file

@ -54,7 +54,7 @@
"@types/through2": "latest",
"@types/travis-fold": "latest",
"@types/xml2js": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^3.4.1-alpha.1",
"@typescript-eslint/eslint-plugin": "^3.6.1-alpha.1",
"@typescript-eslint/experimental-utils": "^3.4.1-alpha.1",
"@typescript-eslint/parser": "^3.4.1-alpha.1",
"async": "latest",