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:
Charles Gagnon 2019-04-23 17:43:40 -07:00 коммит произвёл GitHub
Родитель 85dcd83072
Коммит fc326ce7bb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -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,