eslint: Regression from 2.13.0 release - relative requires in extend
Ref https://github.com/eslint/eslint/pull/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:
{
"extends": "./node_modules/eslint-preset-behance/.eslintrc"
}
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.
Cannot read config file: app/node_modules/node_modules/eslint-preset-behance/.eslintrc
Error: ENOENT: no such file or directory, open 'app/node_modules/node_modules/eslint-preset-behance/.eslintrc'
It’s checking node_modules/node_modules
for some reason
Workaround I guess is that we don’t have to use ./node_modules/
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 7
- Comments: 20 (16 by maintainers)
Commits related to this issue
- Fix: wrong baseDir (fixes #6450) — committed to eslint/eslint by mysticatea 8 years ago
- Fix: wrong baseDir (fixes #6450) — committed to eslint/eslint by mysticatea 8 years ago
- Fix: wrong baseDir (fixes #6450) — committed to eslint/eslint by mysticatea 8 years ago
- Fix: wrong baseDir (fixes #6450) — committed to eslint/eslint by mysticatea 8 years ago
- Fix: wrong baseDir (fixes #6450) — committed to eslint/eslint by mysticatea 8 years ago
- Fix: wrong baseDir (fixes #6450) (#6457) — committed to eslint/eslint by mysticatea 8 years ago
- fix: Allow package to work with eslint ^2.13.0 [Eslint 2.13.0 made some changes to how relative paths work when extending](https://github.com/eslint/eslint/issues/6450), which caused any linting that... — committed to HabitRPG/eslint-config by crookedneighbor 8 years ago
I apologize for this. I will investigate this. I think
relativeTo
should be the directory that .eslintrc exists.Same here. It broke all our builds
I think I figured it out. See https://github.com/eslint/eslint/pull/6468
@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:
It’s looking for
C:\Users\ilya\AppData\Roaming\npm\node_modules\packages\eslint-config-eslint\default.yml
and correct path should beC:\Users\ilya\AppData\Roaming\npm\node_modules\eslint\packages\eslint-config-eslint\default.yml
So it’s going one directory too far up.Is there a deadline at which point the change that broke this will be reverted, absent a fix?
Let’s see what @mysticatea thinks. He should be around soonish and then we can decide whether there’s an easy fix or not.