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

New: Add a flag to specify the folder where plugins are resolved from #18

Merged
merged 2 commits into from Apr 11, 2019

Conversation

Projects
None yet
3 participants
@not-an-aardvark
Copy link
Member

commented Mar 13, 2019

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

@platinumazure

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

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?)

@not-an-aardvark

This comment has been minimized.

Copy link
Member Author

commented Mar 13, 2019

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 CLIEngine, except when there are compelling reasons not to do so (e.g. when CLIEngine accepts function arguments).

@not-an-aardvark

This comment has been minimized.

Copy link
Member Author

commented Mar 16, 2019

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 CLIEngine option.

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.

@platinumazure
Copy link
Member

left a comment

Okay, I'm convinced. This LGTM at this point. Thanks!

@not-an-aardvark

This comment has been minimized.

Copy link
Member Author

commented Apr 4, 2019

@eslint/eslint-tsc This has been open for 21 days with no objections, so I'm moving it to the final comment period.

@not-an-aardvark not-an-aardvark merged commit f2d3eff into master Apr 11, 2019

3 checks passed

commit-message PR title follows commit message guidelines
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details

@not-an-aardvark not-an-aardvark deleted the plugin-root-path-flag branch Apr 11, 2019

@not-an-aardvark

This comment has been minimized.

Copy link
Member Author

commented Apr 11, 2019

If my counting is right:

  • 3 TSC members have approved (or created) this proposal.
  • 3 of the remaining TSC members have "supports consensus" status
  • The remaining 2 members haven't commented

So this RFC has majority support and is now accepted.

not-an-aardvark added a commit to eslint/eslint that referenced this pull request May 10, 2019

New: add --resolve-plugins-relative-to flag
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)

not-an-aardvark added a commit to eslint/eslint that referenced this pull request May 11, 2019

New: add --resolve-plugins-relative-to flag (#11696)
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.