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

Use eslint path to choose where to load eslint's config library #133

Closed
wants to merge 1 commit into from

Conversation

timruffles
Copy link

eslint uses a pretty simple algorithm to work out where the 'project' lives - and node_modules for plugins/configs are loaded relative to - __dirname + '/../../..'.

This means using prettier-eslint-cli's own version of eslint means plugins/configs cannot be loaded. Using the eslint install from eslintPath passed in is more consistent, and provides a way to use config/plugins from node_modules.

Fixes #127

@zimme
Copy link
Member

zimme commented Jun 17, 2019

Let's do another PR is using a different require method outlined in #144 and see if these changes are needed as well.

@fantapop
Copy link

I very much need this. Having to add this commit manually each time I need to update prettier-eslint-cli.

fantapop pushed a commit to fantapop/prettier-eslint-cli that referenced this pull request Jul 26, 2019
allows plugins/configs in node_modules to be found.  Open PR here:
prettier#133
@timruffles
Copy link
Author

@zimme worth looping round to check/include this?

@chrisbobbe
Copy link

FYI, using ConfigFile.load isn't viable with ESLint 6 or later; see #303. This may result in confusion if someone has ESLint 6 or later installed at their project level, especially since prettier-eslint-cli doesn't pin to a valid version range for ESLint in its peer dependencies (it doesn't do that for prettier-eslint either).

@kylemh
Copy link
Collaborator

kylemh commented Mar 6, 2021

Hey @timruffles I know it's been a hot minute, but I'm spending a few hours a weekend working on this repo and prettier-eslint. Feel free to resolve the conflicts, and I'll work on getting this in!

Looking at #144 as well!

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2021

Stale pull request

@idahogurl
Copy link
Collaborator

I believe this was already fixed in #431
Plus this PR is no longer relevant as the ESLint API has radically changed.

@JounQin
Copy link
Member

JounQin commented Aug 13, 2022

Close due to inactive, please feel free to create a new issue with minimal but runnable reproduction. Thanks!

@JounQin JounQin closed this Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local eslint plugins are invisible.
7 participants