Skip to content

Commit 4bfd2a3

Browse files
crisbetokara
authored andcommitted
build: add tslint formatting task (#4109)
1 parent f7c45b2 commit 4bfd2a3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/gulp/tasks/lint.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ gulp.task('dashboardlint', execNodeTask(
1717
'--syntax', 'scss']
1818
));
1919

20+
const tsLintBaseFlags = ['-c', 'tslint.json', '+(src|e2e|tools)/**/*.ts', '--exclude',
21+
'**/node_modules/**/*'];
22+
2023
/** Task to run TSLint against the e2e/ and src/ directories. */
21-
gulp.task('tslint', execNodeTask('tslint', ['-c', 'tslint.json', '+(src|e2e|tools)/**/*.ts',
22-
'--exclude', '**/node_modules/**/*']));
24+
gulp.task('tslint', execNodeTask('tslint', tsLintBaseFlags));
25+
26+
/** Task that automatically fixes TSLint warnings. */
27+
gulp.task('tslint:fix', execNodeTask('tslint', [...tsLintBaseFlags, '--fix']));

0 commit comments

Comments
 (0)