-
Notifications
You must be signed in to change notification settings - Fork 1
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
Issue configuring recommended as a plugin extension #48
Comments
name is a new property of flat config, which it appears you are using. I have a small sample using flat config that I put together working on another issue that you can view here: https://github.com/DaveMBush/eslint-plugin-rxjs/tree/dmb/circular-dependency-error-when-using-recommended/49/tests/using-recommended I'm using a js file for the config, but you'll notice the project file specifies commonjs. I've also tried changing the file type from js to csj and still can't replicate your issue Do you have a minimal project that illustrates your problem that might help me track this down. |
I reproduced the error on this stackblitz: I think it has something todo with the separate eslintrc.js file. If you run the patch that removes the name property, the error is gone:
You still get the circular dependency error, but I created another patch for this in another branch. I referenced this in the other github issue on your plugin (#49) |
I am getting the same error with the legacy config:
|
@woodrunner if you upgrade to 1.0.16 AND use recommended-legacy in your tools/eslint.config.js file (because it is still using legacy format) this problem should be resolved. @nspire909 1.0.16 fixes your issue as well. |
@DaveMBush thank you for your quick fix. Why are you saying I'm using legacy format? It is flat config, no? I indeed use a external eslintrc.js file, but I merge it in my main eslint.config.cjs file with FlatCompat. EDIT: I see the issue. My eslintrc.js is still in the legacy format, and I import the recommended configurations there. Should I keep this external file and convert it to a flat config, or should I copy the entire configuration into the main eslint.config.cjs file? That makes it a much larger file. What is your opinion? |
If you convert the one in tools to flat config, make sure you import it without the compat.config in the main config and more like a plugin like I've done with baseConfig here https://github.com/DaveMBush/SmartNgRX/blob/v-next/libs/smart-ngrx/eslint.config.js#L11 If you can, two files would be preferred. Sometimes you can't get the same inheritance/override behaviour we've had with legacy. |
Describe the bug
On 7 dec 2024 you introduced a
name
property to the recommended config. I'm getting an error about thisname
property:When I remove it from your library it succeeds. Is it possible that this is because
name
is not a valid property of the configs field of a plugin?I changed this in your library:
To this (without name property):
Repro
Version of @smarttools/eslint-plugin-rxjs you are using: 1.0.13
Additional context
My eslint.config.cjs file:
My extended eslintrc.js file:
The text was updated successfully, but these errors were encountered: