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

Missing support for hoisted packages #11238

Closed
FezVrasta opened this issue Jan 4, 2019 · 2 comments
Closed

Missing support for hoisted packages #11238

FezVrasta opened this issue Jan 4, 2019 · 2 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 triage An ESLint team member will look at this issue soon

Comments

@FezVrasta
Copy link

FezVrasta commented Jan 4, 2019

Tell us about your environment

  • ESLint Version: any version
  • Node Version: any version
  • npm Version: not involved, the problem happens with Yarn and other package managers that support module hoisting

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

Please show your full configuration:
irrelevant

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
irrelevant, any eslint configuration that refers to a eslint plugin or preset that has been hoisted will fail to resolve it.
The same happens if eslint gets hoisted, but one of the plugins doesn't.

What did you expect to happen?
Eslint should use the standard node.js module resolution system to make sure it can find hoisted modules.

What actually happened? Please include the actual, raw output from ESLint.
Eslint doesn't seem to use the standard module resolution system and fails to resolve the location of the requested eslint plugins and presets.

Are you willing to submit a pull request to fix this bug?
no, discussion is needed, some of it happened years ago here

I think a possible solution would be to implement #6237, Babel does the same and allows to resolve the problem by having the plugins and presets referred to as require.resolve('module-name-here')

@FezVrasta FezVrasta added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Jan 4, 2019
@not-an-aardvark
Copy link
Member

Closing as a duplicate of #10125.

This is a known issue and there is ongoing work to resolve it; you might be interested in looking at eslint/rfcs#7 and eslint/rfcs#5.

@FezVrasta
Copy link
Author

From what I see it's more than 4 years that the eslint contributors and maintainers are discussing about this issue.

I wonder if it would make sense to consider alternatives to eslint at this point.

Thanks for the heads up anyway

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jul 4, 2019
@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 Jul 4, 2019
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 triage An ESLint team member will look at this issue soon
Projects
None yet
Development

No branches or pull requests

2 participants