-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
Configuration for rule "prefer-regex-literals" is invalid #2545
Comments
You’re using too old an eslint version. Run |
"eslint": "^8.7.0", if I use this latest version I get the same error |
Then it's gulp-eslint. As you can see here: https://unpkg.com/browse/gulp-eslint@6.0.0/package.json gulp-eslint is broken. It should be listing eslint as a peer dep ONLY, but it lists it as a regular dep, and it's using v6, which is ancient. I can't recommend strongly enough that you ditch gulp entirely. |
thanks. yes looking at the dependency tree it still uses version eslint 6.8 and not updated since 3 years. There is a new version called "gulp-eslint-new" :-) |
(-‸ლ) for your own sake, please ditch gulp and just invoke eslint using npm run-scripts :-) |
This comment was marked as spam.
This comment was marked as spam.
My eslint version é current latest: 8.12.0. To fix it i just added to eslint rules the following: "prefer-regex-literals": [
"error",
{
"disallowRedundantWrapping": true
}
] |
I still get this error for the rule in the eslint-config-airbnb-base\rules\best-practices.js
Configuration for rule "prefer-regex-literals" is invalid:
Value [{"disallowRedundantWrapping":true}] should NOT have more than 0 items.
When I run it with eslint directly I don't get the error but when I run this with eslint through gulp-eslint then I get this error.
Does this mean the gulp-eslint version is too old or is this an error in the airbnb base settings?
using:
"eslint": "^8.2.0",
"eslint-config-airbnb-base": "^15.0.0",
"gulp-eslint": "^6.0.0"
The text was updated successfully, but these errors were encountered: