Skip to content
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

v2.13.0 breaks requiring of relative files by changing the PWD #6458

Closed
ljharb opened this issue Jun 17, 2016 · 4 comments
Closed

v2.13.0 breaks requiring of relative files by changing the PWD #6458

ljharb opened this issue Jun 17, 2016 · 4 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion

Comments

@ljharb
Copy link
Sponsor Contributor

ljharb commented Jun 17, 2016

What version of ESLint are you using?
v2.13.0

What parser (default, Babel-ESLint, etc.) are you using?
default

Please show your full configuration:

{
  "extends": "./index.js",
  "rules": {
    "comma-dangle": 0
  }
}

What did you do? Please include the actual source code causing the issue.
eslint .

What did you expect to happen?
Linting.

What actually happened? Please include the actual, raw output from ESLint.
replaced the project root path (ie the current directory) with $PWD

Cannot read config file: $PWD/node_modules/index.js
Error: Cannot find module '$PWD/node_modules/index.js'
Referenced from: $PWD/.eslintrc
Error: Cannot read config file: $PWD/node_modules/index.js
Error: Cannot find module '$PWD/node_modules/index.js'
Referenced from: $PWD/.eslintrc
    at Function.Module._resolveFilename (module.js:440:15)
    at module.exports ($PWD/node_modules/resolve-from/index.js:14:16)
    at module.exports ($PWD/node_modules/require-uncached/index.js:11:17)
    at loadJSConfigFile ($PWD/node_modules/eslint/lib/config/config-file.js:161:16)
    at loadConfigFile ($PWD/node_modules/eslint/lib/config/config-file.js:200:22)

Note that this works fine after npm install eslint@2.12 but fails after npm install eslint@2.13

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jun 17, 2016
@ljharb
Copy link
Sponsor Contributor Author

ljharb commented Jun 17, 2016

The eslint config in question is https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/.eslintrc, if that's helpful.

@ilyavolodin
Copy link
Member

I think this is related to #6450

@ilyavolodin ilyavolodin added bug ESLint is working incorrectly core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jun 17, 2016
@ljharb
Copy link
Sponsor Contributor Author

ljharb commented Jun 17, 2016

Sounds like it's probably a duplicate of #6450 :-)

I'll leave this open just in case, but also feel free to close since the problem is already being tracked.

@mysticatea
Copy link
Member

I think so, too.
I close this issue, then reopen if it's wrong.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

No branches or pull requests

4 participants