Overrides not working when calling xo with absolute paths
See original GitHub issueI have this in my package.json:
"xo": {
"extends": "xo-react",
"parser": "babel-eslint",
"plugins": ["react"],
"envs": ["node", "browser"],
"rules": {
"react/forbid-component-props": 0,
"react/jsx-closing-bracket-location": ["error", "tag-aligned"]
},
"overrides": [{
"files": "src/client/components/*.js",
"rules": {
"unicorn/filename-case": [
"error", {"case": "pascalCase"}
]
}
}, {
"files": "src/client/containers/*.js",
"rules": {
"unicorn/filename-case": [
"error",
{"case": "pascalCase"}
]
}
}]
}
And I have the file src/client/components/ExtendedReferenceManyField.js
Now, if I call
$ xo src/client/components/ExtendedReferenceManyField.js
it finishes without errors. However, calling:
$ xo /home/user/dev/project/src/client/components/ExtendedReferenceManyField.js
will output:
src/client/components/ExtendedReferenceManyField.js:1:1
✖ 1:1 Filename is not in kebab case. Rename it to extended-reference-many-field.js. unicorn/filename-case
1 error
I stumbled on this while using lint-staged in my project.
xo version: 0.18.2 Node version: 6.10.1 OS: Linux Mint 18 Cinnamon 64-bit
futpib earned $60.00 by resolving this issue!
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on Issuehunt to raise funds.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:11 (4 by maintainers)
Top Results From Across the Web
[Bug] Absolute path for overrides group does not work like ...
The override syntax does not allow for absolute path referencing with /group/config . This is possible in the defaults list. I think it...
Read more >absolute path with react, react-app-rewire and typescript
im stuck with connecting all the dots, it doesn't work and i still cant see what i need to do in order to...
Read more >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 >LilyPond snippets: Tweaks and overrides
Showing the same articulation above and below a note or chord. By default, LilyPond does not allow the same articulation (e.g., an accent,...
Read more >ModelSim Command Reference Manual - Microsemi
MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR. CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS).
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 Free
Top 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
I believe I have fallen into the same issue when using
lint-staged
(http://npmjs.com/package/lint-staged) where it may be the case it sends absolute paths since my overrides config has no effect at all.This Fails
This Works
@sindresorhus has rewarded $54.00 to @futpib. See it on IssueHunt