@@ -13,10 +13,6 @@ import * as path from 'path';
1313import { Configuration , ILinterOptions , Linter , findFormatter } from 'tslint' ;
1414import * as ts from 'typescript' ;
1515
16- // Excluded (regexes) of the files to not lint. Generated files should not be linted.
17- // TODO: when moved to using bazel for the build system, this won't be needed.
18- const excluded = [ / ^ d i s t - s c h e m a [ \\ \/ ] .* / , / .* \/ t h i r d _ p a r t y \/ .* / ] ;
19-
2016function _buildRules ( logger : logging . Logger ) {
2117 const tsConfigPath = path . join ( __dirname , '../etc/rules/tsconfig.json' ) ;
2218 const configFile = ts . readConfigFile ( tsConfigPath , ts . sys . readFile ) ;
@@ -52,11 +48,6 @@ export default async function(options: ParsedArgs, logger: logging.Logger) {
5248 const tsLintPath = path . join ( __dirname , '../tslint.json' ) ;
5349 const tsLintConfig = Configuration . loadConfigurationFromPath ( tsLintPath ) ;
5450
55- // Remove comments from the configuration, ie. keys that starts with "//".
56- [ ...tsLintConfig . rules . keys ( ) ]
57- . filter ( x => x . startsWith ( '//' ) )
58- . forEach ( key => tsLintConfig . rules . delete ( key ) ) ;
59-
6051 // Console is used directly by tslint, and when finding a rule that doesn't exist it's considered
6152 // a warning by TSLint but _only_ shown on the console and impossible to see through the API.
6253 // In order to see any warnings that happen from TSLint itself, we hook into console.warn() and
@@ -69,11 +60,6 @@ export default async function(options: ParsedArgs, logger: logging.Logger) {
6960 } ;
7061
7162 program . getRootFileNames ( ) . forEach ( fileName => {
72- const filePath = path . relative ( process . cwd ( ) , fileName ) . replace ( / \\ / g, '/' ) ;
73- if ( excluded . some ( x => x . test ( filePath ) ) ) {
74- return ;
75- }
76-
7763 linter . lint ( fileName , ts . sys . readFile ( fileName ) || '' , tsLintConfig ) ;
7864 } ) ;
7965
0 commit comments