-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot redefine plugin #135
Comments
If it seems it was fixed, then what is this issue reporting? |
My bad, I mean maybe the issue related in #91 is't fixed actually. The following stackblitz project shows the error I encountered. |
Thanks, that's very helpful. I'll take a look. |
Okay, so there is an issue here. As part of loading configuration information, we normalize the plugin: eslintrc/lib/config-array-factory.js Lines 410 to 430 in af564ff
This is actually problematic for a couple of reasons:
I know the intent of this normalization was to prevent us from needing to check if a plugin had properly defined I see two potential solutions to this:
I'd appreciate some thoughts from @eslint/eslint-team on this. |
Maybe we could add new property Line 135 in af564ff
I think that would be the change with the least chance of breaking something. I just tried it and the stackblitz example seems to be working well after the change. |
Ah, that's a great idea variation of option 2. I'll put together a PR. |
* fix: Use original plugin from disk in FlatCompat Fixes #135 * Clean up lint errors * Hide original field from serialization
This issue is driving me crazy. I'm migrating to the flat config file format, and I have lots of errors like:
I think the issue is that sub-configs, such as This is an issue that's brand new to the eslint flat config and is not fixed yet. Please re-open. |
Note that I've run Hmm, it seems that's because my root ...compat.config({
overrides: [
{
extends: ['standard', 'plugin:storybook/recommended'],
files: ['*.js']
}
]
}), And a package eslint.config.js has: ...compat.extends(
'@nuxt/eslint-config',
'plugin:storybook/recommended'
), Removing the root fixes it, but regardless:
|
happens when migrate legacy eslintrc config with flat configs.
both legacy and flat from
@antfu/eslint-config
containseslint-plugin-import
, but seems this was fixed in #91The text was updated successfully, but these errors were encountered: