File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/config-helpers/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ function findPluginConfig(config, pluginConfigName) {
265265 }
266266 }
267267
268- // If it's a legacy config, or the config does not exsist => look for the flat version
268+ // If it's a legacy config, or the config does not exist => look for the flat version
269269 const flatConfig = plugin . configs ?. [ `flat/${ configName } ` ] ;
270270 if (
271271 flatConfig &&
@@ -280,9 +280,10 @@ function findPluginConfig(config, pluginConfigName) {
280280 }
281281
282282 // If we get here, then the config was either not found or is a legacy config
283- const message = directConfig
284- ? `Plugin config "${ configName } " in plugin "${ userPluginNamespace } " is an eslintrc config and cannot be used in this context.`
285- : `Plugin config "${ configName } " not found in plugin "${ userPluginNamespace } ".` ;
283+ const message =
284+ directConfig || flatConfig
285+ ? `Plugin config "${ configName } " in plugin "${ userPluginNamespace } " is an eslintrc config and cannot be used in this context.`
286+ : `Plugin config "${ configName } " not found in plugin "${ userPluginNamespace } ".` ;
286287 throw new TypeError ( message ) ;
287288}
288289
You can’t perform that action at this time.
0 commit comments