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

Small idea for global vs local installation issues #9014

Closed
platinumazure opened this issue Jul 26, 2017 · 1 comment
Closed

Small idea for global vs local installation issues #9014

platinumazure opened this issue Jul 26, 2017 · 1 comment
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion cli Relates to ESLint's command-line interface enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion

Comments

@platinumazure
Copy link
Member

I had a simple idea to try to help alleviate global vs local installation issues-- not a silver bullet but one that might be useful for the most common cases.

Basically, when we're printing the pretty error template due to inability to find plugin, we would check if the running process is under $(npm bin); if so, add a note that this is a global installation of ESLint being run. Otherwise, leave the message as is (in particular don't try to guess if this is a local installation).

This benefits what I believe to be the most common case for global vs local installation problems, which is that the developer actually does want to have locally configured dependencies and means to install ESLint and the plugin locally. For that use case, the issue is one of two things, each occurring about 50/50: The developer is running global ESLint without meaning to, or the developer didn't actually install the plugin locally.

This change would help the first of those issues: we would alert the user (when we know for sure) that they are running global ESLint, and then their question to us become "How do I make sure I'm running local ESLint?" and go from there. (Or for users who don't know whether to run global or local ESLint, it would at least save us the need to ask how ESLint is being invoked.)

Again, this isn't a silver bullet and is only meant to try to help with a fairly common subtype of the global vs local install issue. It may be rendered redundant if we decide to allow global ESLint to delegate to local ESLint (vaguely like grunt and grunt-cli). And I certainly don't want to do this if we think this would actually add more confusion than it would remove. Just looking for discussion at this point.

@platinumazure platinumazure added cli Relates to ESLint's command-line interface enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jul 26, 2017
@platinumazure
Copy link
Member Author

Vaguely related: I've just added debug logging for successfully loaded plugins in #10100, where a user can hopefully spot if a loaded plugin has an unexpected version or path.

Still thinking this proposed issue could be useful for the failure case, but it's been open a while without a lot of activity. I'll probably close this in a couple of weeks, unless someone on the team decides to actually follow the maintainer guide and close this sooner 😄

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Nov 26, 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 Nov 26, 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 cli Relates to ESLint's command-line interface enhancement This change enhances an existing feature of ESLint 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

1 participant