Skip to content

Commit 397efbd

Browse files
author
Andy
authored
Merge pull request #15078 from Microsoft/lint-linter
Lint custom lint rules
2 parents 12df032 + 7347e5e commit 397efbd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Gulpfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ gulp.task("lint", "Runs tslint on the compiler sources. Optional arguments are:
10241024
const fileMatcher = cmdLineOptions["files"];
10251025
const files = fileMatcher
10261026
? `src/**/${fileMatcher}`
1027-
: "Gulpfile.ts 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'";
1027+
: "Gulpfile.ts 'scripts/tslint/*.ts' 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'";
10281028
const cmd = `node node_modules/tslint/bin/tslint ${files} --format stylish`;
10291029
console.log("Linting: " + cmd);
10301030
child_process.execSync(cmd, { stdio: [0, 1, 2] });

Jakefile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ task("lint", ["build-rules"], () => {
11971197
const fileMatcher = process.env.f || process.env.file || process.env.files;
11981198
const files = fileMatcher
11991199
? `src/**/${fileMatcher}`
1200-
: "Gulpfile.ts 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'";
1200+
: "Gulpfile.ts 'scripts/tslint/*.ts' 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'";
12011201
const cmd = `node node_modules/tslint/bin/tslint ${files} --format stylish`;
12021202
console.log("Linting: " + cmd);
12031203
jake.exec([cmd], { interactive: true }, () => {

scripts/tslint/booleanTriviaRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function walk(ctx: Lint.WalkContext<void>): void {
6767
return;
6868
}
6969

70-
let ranges = ts.getTrailingCommentRanges(sourceFile.text, arg.pos) || ts.getLeadingCommentRanges(sourceFile.text, arg.pos);
70+
const ranges = ts.getTrailingCommentRanges(sourceFile.text, arg.pos) || ts.getLeadingCommentRanges(sourceFile.text, arg.pos);
7171
if (ranges === undefined || ranges.length !== 1 || ranges[0].kind !== ts.SyntaxKind.MultiLineCommentTrivia) {
7272
ctx.addFailureAtNode(arg, "Tag boolean argument with parameter name");
7373
return;

0 commit comments

Comments
 (0)