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.
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 https://github.com/ota-meshi/eslint-plugin-jsonc/issues/313