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
Regression from 2.13.0 release - relative requires in extend #6450
Comments
This seems to also result in going up too many parent directories: Results in:
Before it would extend |
Same here. It broke all our builds |
Issue was introduced by #6359 fix. |
for the change:
And it looks like the test wasn't testing the change in applyExtends but the input/output of |
This is an issue for me as well. In my instance, this error appears to be related to using eslint as a non-global package and running it with |
Let's see what @mysticatea thinks. He should be around soonish and then we can decide whether there's an easy fix or not. |
I apologize for this. |
@mysticatea That's what |
Mmm, weird, we also have relative path in our setting and it's working: https://github.com/eslint/eslint/blob/414206cdec53f4967f56ee23ac0c1eb45b31846a/.eslintrc.yml |
That eslint/lib/config/config-file.js Line 328 in 414206c
|
|
Fixed: 4c80417#diff-3ca2712fe1d95b19637e57eb1a8b3a5bR318 But I'm not sure this is a correct way or not... |
I don't think special-casing |
Is there a deadline at which point the change that broke this will be reverted, absent a fix? |
@ljharb We are usually try to release patches on the following Monday after the release that created an issue. @mysticatea Another problem related to this change. You can't run global eslint at all anymore: $ eslint .
Cannot read config file: C:\Users\ilya\AppData\Roaming\npm\node_modules\packages\eslint-config-eslint\default.yml
Error: ENOENT: no such file or directory, open 'C:\Users\ilya\AppData\Roaming\npm\node_modules\packages\eslint-config-eslint\default.yml'
Referenced from: c:\Users\ilya\Documents\github\eslint\.eslintrc.yml
Error: Cannot read config file: C:\Users\ilya\AppData\Roaming\npm\node_modules\packages\eslint-config-eslint\default.yml
Error: ENOENT: no such file or directory, open 'C:\Users\ilya\AppData\Roaming\npm\node_modules\packages\eslint-config-eslint\default.yml'
Referenced from: c:\Users\ilya\Documents\github\eslint\.eslintrc.yml
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at readFile (C:\Users\ilya\AppData\Roaming\npm\node_modules\eslint\lib\config\config-file.js:71:15)
at loadYAMLConfigFile (C:\Users\ilya\AppData\Roaming\npm\node_modules\eslint\lib\config\config-file.js:102:30)
at loadConfigFile (C:\Users\ilya\AppData\Roaming\npm\node_modules\eslint\lib\config\config-file.js:219:22)
at load (C:\Users\ilya\AppData\Roaming\npm\node_modules\eslint\lib\config\config-file.js:500:18)
at C:\Users\ilya\AppData\Roaming\npm\node_modules\eslint\lib\config\config-file.js:392:36
at Array.reduceRight (native)
at applyExtends (C:\Users\ilya\AppData\Roaming\npm\node_modules\eslint\lib\config\config-file.js:363:28) It's looking for |
I think I figured it out. See #6468 |
I'm not sure this fully resolved the problem. I'm still seeing this error in a CI build that shows that it is pulling in the latest version, including this patch. I started seeing this at the end of last week and have tracked it down to my use of grunt-eslint, which depends on The piece that might be different in my case is that my |
(This fix did resolve my issue from #6458, fwiw, thanks!!!) |
@travi please open a new issue and provide your details. |
sure thing: #6489. thank you for the help |
[Eslint 2.13.0 made some changes to how relative paths work when extending](eslint/eslint#6450), which caused any linting that used our config to fail. By referencing the package name instead in our sub-configs, we resolve this erroneous behavior.
Ref #6359 I think, @mysticatea
What version of ESLint are you using?
2.13.0 (just released)
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
run
eslint app_folder/
Updated to 2.13.0 in CI
What did you expect to happen?
No issues
What actually happened? Please include the actual, raw output from ESLint.
It's checking
node_modules/node_modules
for some reasonWorkaround I guess is that we don't have to use
./node_modules/
The text was updated successfully, but these errors were encountered: