Skip to content

Commit 17d8b02

Browse files
author
Orta Therox
authored
Retain the original eslint arg order (microsoft#39450)
1 parent 6469622 commit 17d8b02

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

Diff for: Gulpfile.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,12 @@ const lintFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("lin
350350
/** @type { (folder: string) => { (): Promise<any>; displayName?: string } } */
351351
const eslint = (folder) => async () => {
352352

353+
const formatter = cmdLineOptions.ci ? "stylish" : "autolinkable-stylish";
353354
const args = [
354355
"node_modules/eslint/bin/eslint",
355356
"--cache",
356357
"--cache-location", `${folder}/.eslintcache`,
358+
"--format", formatter,
357359
"--rulesdir", "scripts/eslint/built/rules",
358360
"--ext", ".ts",
359361
];
@@ -362,14 +364,6 @@ const eslint = (folder) => async () => {
362364
args.push("--fix");
363365
}
364366

365-
// Use stylish format on CI, so that it can be picked up by GH Action's rule matchers
366-
if (cmdLineOptions.ci) {
367-
args.push("--format", "stylish");
368-
}
369-
else {
370-
args.push("--format", "autolinkable-stylish");
371-
}
372-
373367
args.push(folder);
374368

375369
log(`Linting: ${args.join(" ")}`);

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@types/through2": "latest",
5555
"@types/travis-fold": "latest",
5656
"@types/xml2js": "^0.4.0",
57-
"@typescript-eslint/eslint-plugin": "^3.4.1-alpha.1",
57+
"@typescript-eslint/eslint-plugin": "^3.6.1-alpha.1",
5858
"@typescript-eslint/experimental-utils": "^3.4.1-alpha.1",
5959
"@typescript-eslint/parser": "^3.4.1-alpha.1",
6060
"async": "latest",

0 commit comments

Comments
 (0)