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) {
1134
1134
1135
1135
let hash = getOptionsHash ( 'settings' , settings )
1136
1136
1137
- const usedParserOptions = languageOptions
1138
- ? languageOptions . parserOptions
1139
- : parserOptions
1137
+ const usedParserOptions = languageOptions ?. parserOptions ?? parserOptions
1140
1138
1141
1139
hash += getOptionsHash ( 'parserOptions' , usedParserOptions )
1142
1140
1143
1141
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
1149
1148
} else {
1150
- hash += String ( parserPath )
1149
+ const { meta } = languageOptions ?. parser ?? { }
1150
+
1151
+ if ( meta ) {
1152
+ hash += getOptionsHash ( 'parserMeta' , meta )
1153
+ }
1151
1154
}
1152
1155
1153
1156
return hash
You can’t perform that action at this time.
0 commit comments