File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -1134,20 +1134,23 @@ function makeContextCacheKey(context: RuleContext | ChildContext) {
11341134
11351135 let hash = getOptionsHash ( 'settings' , settings )
11361136
1137- const usedParserOptions = languageOptions
1138- ? languageOptions . parserOptions
1139- : parserOptions
1137+ const usedParserOptions = languageOptions ?. parserOptions ?? parserOptions
11401138
11411139 hash += getOptionsHash ( 'parserOptions' , usedParserOptions )
11421140
11431141 if ( languageOptions ) {
1144- const { parser : { meta } = { } , ecmaVersion, sourceType } = languageOptions
1145- hash +=
1146- getOptionsHash ( 'parserMeta' , meta ) +
1147- String ( ecmaVersion ) +
1148- String ( sourceType )
1142+ const { ecmaVersion, sourceType } = languageOptions
1143+ hash += String ( ecmaVersion ) + String ( sourceType )
1144+ }
1145+
1146+ if ( parserPath ) {
1147+ hash += parserPath
11491148 } else {
1150- hash += String ( parserPath )
1149+ const { meta } = languageOptions ?. parser ?? { }
1150+
1151+ if ( meta ) {
1152+ hash += getOptionsHash ( 'parserMeta' , meta )
1153+ }
11511154 }
11521155
11531156 return hash
You can’t perform that action at this time.
0 commit comments