You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using config "flat/recommended" (eslint.config.js) in an environment linting *.js and *.yaml together, the plugin fails:
TypeError: Key "rules": Key "yml/no-empty-document": Could not find plugin "yml".
Root cause seems that the config contains two objects. The first one correctly configures the plugin. However, the second object contains the recommended rules without a "files" property, thus ESLint tries to apply these rules on all JS files.
My current workaround is:
return[// ...eslintPluginYml.configs["flat/recommended"][0],{files: ["**/*.yaml","**/*.yml"],rules: {
...eslintPluginYml.configs["flat/recommended"][1].rules,// ... extra rules},}];
When using config "flat/recommended" (eslint.config.js) in an environment linting *.js and *.yaml together, the plugin fails:
Root cause seems that the config contains two objects. The first one correctly configures the plugin. However, the second object contains the recommended rules without a "files" property, thus ESLint tries to apply these rules on all JS files.
My current workaround is:
See also ota-meshi/eslint-plugin-jsonc#313
The text was updated successfully, but these errors were encountered: