Skip to content

Conversation

@tbroyer
Copy link
Contributor

@tbroyer tbroyer commented Apr 4, 2025

Fixes #43

tbroyer added 3 commits April 4, 2025 15:34
This allows associating the plugin with the 'depend' namespace in
flat config; otherwise ESLint would error out because the plugin
instances in the user's configuration file and in the 'recommended'
config aren't the same, while both tentatively associated to the
same namespace.

This should allow using eslint-plugin-depend from the command line
with `eslint --plugin depend --rule 'depend/ban-dependencies: error'`
This allows referencing the config in string form in a flat
config `extends` with the `defineConfig` helper:

    plugins: { depend },
    extends: [ 'depend/flat/recommended' ],

const plugin: ESLint.Plugin = {rules};
const plugin: ESLint.Plugin = {
meta: {name, version},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if all plugins had this, its probably what ESLint should actually be comparing by 👀

@43081j 43081j merged commit b068cb6 into es-tooling:main Apr 4, 2025
3 checks passed
@tbroyer tbroyer deleted the default-export branch April 4, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConfigError: Config (unnamed): Key "plugins": Cannot redefine plugin "depend".

2 participants