-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Bug: Crashes ESLint due to circular reference in config #131
Comments
Yes, given the flat config has not been widely supported in the community, I'm 👍 to support both. will make a PR later. Update: to use eslint-plugin-security v2 with eslintrc configs, just use module.exports = {
extends: ['plugin:security/recommended-legacy'],
}; |
it also moves rule tests to `./test/rules`, and adds a test for the configs. fixes #131 Signed-off-by: 唯然 <weiran.zsd@outlook.com>
it also moves rule tests to `./test/rules`, and adds a test for the configs. fixes #131 Signed-off-by: 唯然 <weiran.zsd@outlook.com>
it also moves rule tests to `./test/rules`, and adds a test for the configs. fixes #131 Signed-off-by: 唯然 <weiran.zsd@outlook.com>
it also moves rule tests to `./test/rules`, and adds a test for the configs. fixes #131 Signed-off-by: 唯然 <weiran.zsd@outlook.com>
it also moves rule tests to `./test/rules`, and adds a test for the configs. fixes #131 Signed-off-by: 唯然 <weiran.zsd@outlook.com>
The same problem appears to be there with release 2.1.0 This is my
I still get
My configuration works with release 1.7.1 |
@StefanFl the eslintrc config has renamed to |
@aladdin-add Thank you for the clarification, that works for the moment and now I start changing the configuration to the more modern way. |
What version of eslint-plugin-security are you using?
2.0.0
ESLint Environment
Node version:
21.4.0
, Bun:1.0.18
npm version:
9.8.1
, pnpm:8.12.1
Local ESLint version:
8.55.0
Global ESLint version: none
Operating System: Arch Linux;
Linux 6.6.6-arch1-1 x86_64 unknown
What parser are you using?
Default (Espree)
What did you do?
Configuration
package.json
:What did you expect to happen?
ESLint config is loaded correctly and ESLint runs without error.
What actually happened?
Participation
Additional comments
A circular reference in the ESLint config was introduced in #118. This causes ESLint to error upon loading the config, when the user config is supplied as anything other than a "flat eslint config"; JS with
require('eslint-plugin-security').configs.recommended
.The ESLint flat config is fine to support, however, it should not come at the expense of the regular config variants e.g.,
package.json#eslintConfig
,.eslintrc
.Please support both flat config and regular configs.
The text was updated successfully, but these errors were encountered: