File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export class ESLintAdapter {
132132 }
133133
134134 private getESLintResult ( fileName : string , sourceFile : ts . SourceFile ) {
135- if ( this . ignoredFilepathMap . get ( fileName ) === true ) return [ ] ;
135+ if ( this . ignoredFilepathMap . get ( fileName . replace ( / \\ / g , '/' ) ) === true ) return [ ] ;
136136 const configArray = this . configProvider . getConfigArrayForFile ( fileName ) ;
137137 const configFileContent = configArray . extractConfig ( fileName ) . toCompatibleObjectAsConfigFileContent ( ) ;
138138 if ( ! isParserModuleNameValid ( configFileContent . parser , path . join ( "@typescript-eslint" , "parser" ) ) ) {
@@ -146,12 +146,12 @@ export class ESLintAdapter {
146146 }
147147
148148 public checkFileToBeIgnored ( fileName : string ) {
149- if ( fileName . indexOf ( "node_modules" + path . sep ) !== - 1 ) return ;
150- if ( ! fileName . endsWith ( ".ts" ) && ! fileName . endsWith ( ".tsx" ) ) return ;
149+ if ( / n o d e _ m o d u l e s [ \\ / ] / i . test ( fileName ) || ! / \. t s x ? $ / i . test ( fileName ) ) return ;
150+ const normalized = fileName . replace ( / \\ / g , '/' ) ;
151151 Promise . resolve ( )
152152 . then ( ( ) => new ESLint ( ) )
153- . then ( eslint => eslint . isPathIgnored ( fileName ) )
154- . then ( result => this . ignoredFilepathMap . set ( fileName , result ) ) ;
153+ . then ( eslint => eslint . isPathIgnored ( normalized ) )
154+ . then ( result => this . ignoredFilepathMap . set ( normalized , result ) ) ;
155155 }
156156
157157 public getSemanticDiagnostics (
You can’t perform that action at this time.
0 commit comments