-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
New: Add a flag to specify the folder where plugins are resolved from #18
Conversation
Question: Does this definitely need a CLI flag, or could we just add a property to the CLIEngine constructor? (Put another way, is there an integration is invoking ESLint using our CLI, so having a flag there would be beneficial for that integration?) |
I know that there are integrations that invoke ESLint using our CLI, based on feature requests related to exit codes that we've received in the past. I don't have specific examples of integrations that use the CLI and would also need this option, but it seems likely that they exist based on how many users we have. I'm inclined to to have us support the same options in the CLI as we do in |
When working on eslint/eslint#11515, I realized that this flag would also be useful for users who currently run global installations of ESLint with an external config file, since it would prevent them from needing to install any plugins locally when their projects don't have anything else related to ESLint installed locally. So I think we should have a CLI flag in addition to a While this isn't a breaking change (so it has no hard deadline), I think it would be nice if this is ready around the same time as ESLint v6 to minimize migration issues for integrations/global installation users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'm convinced. This LGTM at this point. Thanks!
@eslint/eslint-tsc This has been open for 21 days with no objections, so I'm moving it to the final comment period. |
If my counting is right:
So this RFC has majority support and is now accepted. |
With the [2018-simplified-package-loading RFC](https://github.com/eslint/rfcs/blob/8bc0b80e0b3e54d10991a4774c41f7375dfcbbfe/designs/2018-simplified-package-loading/README.md) implemented, ESLint always resolves plugins relative to the current working directory. The CWD works well for the most common use case, but is inconvenient for certain integrations. This commit proposes adding a CLI flag to specify an alternative place where plugins should be resolved from. (Implements eslint/rfcs#18)
With the [2018-simplified-package-loading RFC](https://github.com/eslint/rfcs/blob/8bc0b80e0b3e54d10991a4774c41f7375dfcbbfe/designs/2018-simplified-package-loading/README.md) implemented, ESLint always resolves plugins relative to the current working directory. The CWD works well for the most common use case, but is inconvenient for certain integrations. This commit proposes adding a CLI flag to specify an alternative place where plugins should be resolved from. (Implements eslint/rfcs#18)
Summary
With the 2018-simplified-package-loading RFC implemented, ESLint always resolves plugins relative to the current working directory. The CWD works well for the most common use case, but is inconvenient for certain integrations. This RFC proposes adding a CLI flag to specify an alternative place where plugins should be resolved from.
Related Issues