Overrides not applied
See original GitHub issueEnvironment
- ESLint Version:
4.18.2
and4.19.1
- Node Version:
6.11.3
- ~npm~ Yarn Version:
1.5.1
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint
Configuration
project/.eslintrc
{
"env": {
"es6": true
},
"extends": "airbnb", // includes func-names, no-unused-expressions, prefer-arrow-callback
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018
},
"plugins": [
"import"
],
"root": true,
"rules": {
// …
},
"overrides": [
{
// for spec files
"env": {
"mocha": true,
},
"files": [
"**/*.spec.js",
"**/*.spec.jsx"
],
"rules": {
"func-names": "off",
"no-unused-expressions": "off",
"prefer-arrow-callback": [
"error",
"never"
]
}
}
],
"settings": {
"import/resolver": "webpack"
}
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
project/src/…/index.spec.jsx
describe('SomeComponent', function () {
// …
});
What did you expect to happen?
Overrides to be applied
What actually happened? Please include the actual, raw output from ESLint.
Errors for all 3 rules in the override block
22:1 error 'describe' is not defined no-undef
22:32 error Unexpected function expression prefer-arrow-callback
22:32 warning Unexpected unnamed function func-names
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Local Overrides Not Working - Google Groups
Configure (enable) Local Overrides; From DevTools > Network panel, right click on webpage1.html and select 'Save for overrides' (only showing up for Canary)...
Read more >React App and Chrome DevTools local overrides not working?
I have tried to do local overrides through the chrome dev tools on other non react sites, there it is working. Am I...
Read more >Local overrides not working: "Changes to this file were not ...
I've been using local overrides in multiple Chromium browsers (Chrome, Brave, Edge, and Canary) to modify JS for a particular site for many ......
Read more >Using Local Overrides in DevTools | A Faster Web
Not only does the overrides feature allow you to experiment with design ... If you're working on a site locally, these new features...
Read more >Graphic overrides are not working for certain elements within ...
Graphic overrides are not working for certain elements within a Revit view · Issue: When trying to change the appearance of elements within...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@zetaraku in your case, the
env
should be top-level.For me it doesn’t seem to work when I write my config like this:
Adding
overrides
directly into'./some-shared-config'
works, but I’d expect it to behave in the same way 🤔It looks like this doesn’t work either:
Update
It looks like I needed to rename my
.eslintrc.js
which I used as a base (e.g..eslintrc.base.js
).