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
Can't overwrite "strict" rule #727
Comments
Unfortunately, there seems to be a bug on eslint-config-airbnb that ignores rewriting the "strict" rules, so we can't check that we're always using strict. I opened an issue on their repository about it: airbnb/javascript#727
If you're extending I'm not really sure why you wouldn't be able to enable that warning - if you try |
That's odd. I tried changing to |
You can now use the https://npmjs.com/eslint-config-airbnb-base package directly. Please reopen this if you're still having trouble. |
I can not get this to work correctly even after switching to @ljharb |
@Starefossen the separate base package includes that file but it's not included in the main export - however, it's turned on here. What problem are you having? |
Sorry for this way to late reply :( The problem I had was to force the use of However this was in a Node.js project and my models are not ES6 modules and I wanted them all to have strict mode enabled and I was able to force it by setting {
"extends": "airbnb-base",
"env": {
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script",
"ecmaFeatures": {
"modules": false
}
},
"rules": {
"strict": [2, "global"]
}
} |
@Starefossen you're solution works. I had the exact same use case for linting an AWS Lambda project. Thanks! |
I have the following files:
Running
eslint foo.js
returns successfully, even thoughfoo.js
has no"use strict";
directive. If I change toextends: eslint:recommended
, it complains because of the lack of"use strict";
(as expected).I tried to overwrite another rule, so I changed the files to:
And it worked. I was able to overwrite
no-unused-vars
.I'm running
eslint@1.10.3
andeslint-config-airbnb@5.0.0
with Node v5.5.0 and npm v3.6.0.The text was updated successfully, but these errors were encountered: