When using config "flat/recommended-with-json" (eslint.config.js) in an environment linting .js and .json together, the plugin fails:
TypeError: Key "rules": Key "jsonc/comma-dangle": Could not find plugin "jsonc".
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-with-json" (eslint.config.js) in an environment linting .js and .json 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-yml/issues/310