Skip to content

Commit 4ebc3f6

Browse files
committed
test: allow benchmarks to disable tslint rules
Previously only spec files could do it. Benchmark files are similar enough to specs that they should be allowed to disable tslint globally.
1 parent 91a641e commit 4ebc3f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rules/noGlobalTslintDisableRule.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ class Walker extends Lint.RuleWalker {
4646
if (sourceFile.fileName.match(/_spec.ts$/)) {
4747
return;
4848
}
49+
// Ignore benchmark files.
50+
if (sourceFile.fileName.match(/_benchmark.ts$/)) {
51+
return;
52+
}
4953

5054
// Find all comment nodes.
5155
const ranges = this._findComments(sourceFile);

0 commit comments

Comments
 (0)