Skip to content

Commit d69af5a

Browse files
committed
build: ignore dist-schema for linting
1 parent b02a7e5 commit d69af5a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/lint.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ import * as path from 'path';
1212
import { Configuration, ILinterOptions, Linter, findFormatter } from 'tslint';
1313
import * as ts from 'typescript';
1414

15+
// Blacklist (regexes) of the files to not lint. Generated files should not be linted.
16+
// TODO: when moved to using bazel for the build system, this won't be needed.
17+
const blacklist = [
18+
/^dist-schema[\\\/].*/,
19+
];
20+
1521

1622
function _buildRules(logger: logging.Logger) {
1723
const tsConfigPath = path.join(__dirname, '../rules/tsconfig.json');
@@ -50,6 +56,10 @@ export default function (options: ParsedArgs, logger: logging.Logger) {
5056
const tsLintConfig = Configuration.loadConfigurationFromPath(tsLintPath);
5157

5258
program.getRootFileNames().forEach(fileName => {
59+
if (blacklist.some(x => x.test(path.relative(process.cwd(), fileName)))) {
60+
return;
61+
}
62+
5363
linter.lint(fileName, ts.sys.readFile(fileName) || '', tsLintConfig);
5464
});
5565

0 commit comments

Comments
 (0)