Move rulesDirectory from JSON to tasks (#1225)
This is so TSA scans can use the same tslint JSON file (they download the rule additions to a different directory)
This commit is contained in:
Родитель
85dcd83072
Коммит
fc326ce7bb
|
@ -25,6 +25,7 @@ require('./tasks/htmltasks')
|
|||
require('./tasks/packagetasks')
|
||||
|
||||
gulp.task('ext:lint', () => {
|
||||
// !! If updating this make sure to check if you need to update the TSA Scan task in ADO !!
|
||||
var program = tslint.Linter.createProgram('tsconfig.json');
|
||||
return gulp.src([
|
||||
config.paths.project.root + '/src/**/*.ts',
|
||||
|
@ -33,7 +34,8 @@ gulp.task('ext:lint', () => {
|
|||
])
|
||||
.pipe((gulpTsLint({
|
||||
program,
|
||||
formatter: "verbose"
|
||||
formatter: "verbose",
|
||||
rulesDirectory: "node_modules/tslint-microsoft-contrib"
|
||||
})))
|
||||
.pipe(gulpTsLint.report());
|
||||
});
|
||||
|
|
|
@ -18,6 +18,7 @@ var tslint = require('tslint');
|
|||
var min = (argv.min === undefined) ? false : true;
|
||||
|
||||
gulp.task('html:lint', () => {
|
||||
// !! If updating this make sure to check if you need to update the TSA Scan task in ADO !!
|
||||
var program = tslint.Linter.createProgram(config.paths.html.root + '/tsconfig.json');
|
||||
return gulp.src([
|
||||
config.paths.html.root + '/src/**/*.ts',
|
||||
|
@ -25,9 +26,10 @@ gulp.task('html:lint', () => {
|
|||
])
|
||||
.pipe((gulpTsLint({
|
||||
program,
|
||||
formatter: "verbose"
|
||||
formatter: "verbose",
|
||||
rulesDirectory: "node_modules/tslint-microsoft-contrib"
|
||||
})))
|
||||
.pipe(gulpTsLint.report());
|
||||
.pipe(gulpTsLint.report())
|
||||
});
|
||||
|
||||
// Compile TypeScript to JS
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"rulesDirectory": "node_modules/tslint-microsoft-contrib",
|
||||
"rules": {
|
||||
"no-banned-terms": true,
|
||||
"no-delete-expression": true,
|
||||
|
|
Загрузка…
Ссылка в новой задаче