build: update tslint to latest version (#35800)

The old version we currently use does not properly implement the
option to exclude files from within the `tslint.json` file.

PR Close #35800
This commit is contained in:
Paul Gschwendtner
2020-03-02 19:00:50 +01:00
committed by atscott
parent 93fc392549
commit 5349e46b46
8 changed files with 47 additions and 37 deletions

View File

@ -28,8 +28,7 @@ describe('Google3 dynamic queries TSLint rule', () => {
function runTSLint(fix = true) {
const program = Linter.createProgram(join(tmpDir, 'tsconfig.json'));
const linter = new Linter({fix, rulesDirectory: [rulesDirectory]}, program);
const config = Configuration.parseConfigFile(
{rules: {'dynamic-queries': true}, linterOptions: {typeCheck: true}});
const config = Configuration.parseConfigFile({rules: {'dynamic-queries': true}});
program.getRootFileNames().forEach(fileName => {
linter.lint(fileName, program.getSourceFile(fileName) !.getFullText(), config);

View File

@ -38,8 +38,7 @@ describe('Google3 explicitQueryTiming TSLint rule', () => {
function runTSLint(fix = true) {
const program = Linter.createProgram(join(tmpDir, 'tsconfig.json'));
const linter = new Linter({fix, rulesDirectory: [rulesDirectory]}, program);
const config = Configuration.parseConfigFile(
{rules: {'explicit-query-timing': true}, linterOptions: {typeCheck: true}});
const config = Configuration.parseConfigFile({rules: {'explicit-query-timing': true}});
program.getRootFileNames().forEach(fileName => {
linter.lint(fileName, program.getSourceFile(fileName) !.getFullText(), config);

View File

@ -29,8 +29,7 @@ describe('Google3 missing injectable tslint rule', () => {
function runTSLint(fix = true) {
const program = Linter.createProgram(join(tmpDir, 'tsconfig.json'));
const linter = new Linter({fix, rulesDirectory: [rulesDirectory]}, program);
const config = Configuration.parseConfigFile(
{rules: {'no-missing-injectable': true}, linterOptions: {typeCheck: true}});
const config = Configuration.parseConfigFile({rules: {'no-missing-injectable': true}});
program.getRootFileNames().forEach(fileName => {
linter.lint(fileName, program.getSourceFile(fileName) !.getFullText(), config);

View File

@ -30,8 +30,8 @@ describe('Google3 noTemplateVariableAssignment TSLint rule', () => {
function runTSLint() {
const program = Linter.createProgram(join(tmpDir, 'tsconfig.json'));
const linter = new Linter({fix: false, rulesDirectory: [rulesDirectory]}, program);
const config = Configuration.parseConfigFile(
{rules: {'no-template-variable-assignment': true}, linterOptions: {typeCheck: true}});
const config =
Configuration.parseConfigFile({rules: {'no-template-variable-assignment': true}});
program.getRootFileNames().forEach(fileName => {
linter.lint(fileName, program.getSourceFile(fileName) !.getFullText(), config);

View File

@ -43,8 +43,7 @@ describe('Google3 Renderer to Renderer2 TSLint rule', () => {
function runTSLint(fix: boolean) {
const program = Linter.createProgram(join(tmpDir, 'tsconfig.json'));
const linter = new Linter({fix, rulesDirectory: [rulesDirectory]}, program);
const config = Configuration.parseConfigFile(
{rules: {'renderer-to-renderer2': true}, linterOptions: {typeCheck: true}});
const config = Configuration.parseConfigFile({rules: {'renderer-to-renderer2': true}});
program.getRootFileNames().forEach(fileName => {
linter.lint(fileName, program.getSourceFile(fileName) !.getFullText(), config);

View File

@ -30,7 +30,6 @@ describe('Google3 undecorated classes with decorated fields TSLint rule', () =>
const linter = new Linter({fix, rulesDirectory: [rulesDirectory]}, program);
const config = Configuration.parseConfigFile({
rules: {'undecorated-classes-with-decorated-fields': true},
linterOptions: {typeCheck: true}
});
program.getRootFileNames().forEach(fileName => {