@@ -29,9 +29,6 @@ const isOldNode = /^0/.test(nodeVersion);
2929const defaultCwd = process . cwd ( ) ;
3030const ESLINT_SEVERITY_ERROR = 2 ;
3131const ESLINT_SEVERITY_WARNING = 1 ;
32- const BRACKETS_TYPE_ERROR = 'problem_type_error' ;
33- const BRACKETS_TYPE_WARNING = 'problem_type_warning' ;
34- const BRACKETS_TYPE_META = 'problem_type_meta' ;
3532
3633let cli : ESLintCLIEngine | null = null ;
3734let currentVersion : string | null = null ;
@@ -210,15 +207,15 @@ function mapEslintMessage(result: any, majorVersion: number): CodeInspectionResu
210207 switch ( result . severity ) {
211208 case ESLINT_SEVERITY_ERROR :
212209 message = 'ERROR: ' ;
213- type = BRACKETS_TYPE_ERROR as CodeInspectionResultType ;
210+ type = CodeInspectionResultType . ERROR ;
214211 break ;
215212 case ESLINT_SEVERITY_WARNING :
216213 message = 'WARNING: ' ;
217- type = BRACKETS_TYPE_WARNING as CodeInspectionResultType ;
214+ type = CodeInspectionResultType . WARNING ;
218215 break ;
219216 default :
220217 message = 'UNKNOWN: ' ;
221- type = BRACKETS_TYPE_META as CodeInspectionResultType ;
218+ type = CodeInspectionResultType . META ;
222219 }
223220
224221 message += result . message ;
@@ -248,7 +245,7 @@ function createUserError(message: string): CodeInspectionReport {
248245 erroredLastTime = true ;
249246 return {
250247 errors : [ {
251- type : 'problem_type_error' ,
248+ type : CodeInspectionResultType . ERROR ,
252249 message,
253250 pos : { line : 0 , ch : 0 }
254251 } ]
@@ -323,3 +320,8 @@ export function fixFile(
323320 }
324321 callback ( err , res ) ;
325322}
323+
324+ export function configFileModified ( projectRoot , useEmbeddedESLint ) {
325+ setProjectRoot ( projectRoot , null , useEmbeddedESLint ) ;
326+ currentProjectRoot = projectRoot ;
327+ }
0 commit comments