fix: work around eslint plugin sharing limitation#458
Draft
serhalp wants to merge 3 commits into
Draft
Conversation
7bd6c2d to
f903882
Compare
0a2ec55 to
bf46619
Compare
See https://www.npmjs.com/package/@rushstack/eslint-patch for a full history. See https://goodeggs.slack.com/archives/CPX6NFU02/p1586283695076400 and https://goodeggs.slack.com/archives/CPX6NFU02/p1588966563372800 for some past discussions on the topic. I generally avoid monkey-patches like the plague, but: - all alternatives here are terrible, are high cost/effort, and require adjustments in every single repo that uses eslint-plugin-goodeggs - this is causing significant developer pain - this is a tracked issue in an active, maintained community library (eslint) which has a specific roadmap to address the underlying issue - this is a community-maintained monkey-patch used by many repos, and owned by Microsoft
7864fc3 to
9946b09
Compare
Contributor
Author
|
If anyone is looking at this some day in the future... the above patch library appears not to work with eslint 8, even though it claims it does. Last I checked, that's the blocker to using this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
See https://www.npmjs.com/package/@rushstack/eslint-patch for detailed context.
See https://goodeggs.slack.com/archives/CPX6NFU02/p1586283695076400 and https://goodeggs.slack.com/archives/CPX6NFU02/p1588966563372800 for some past discussions on the topic.
In practice, what this means is that the latest setup where repos use goodeggs-toolkit for linting (which wraps eslint-plugin-goodeggs) does not work correctly in IDEs that try to use the underlying
eslintcommands directly rather than the goodeggs-toolkitgetk runcommands. Most IDEs should be able to work around this by configuring the--resolve-plugins-relative-tooption, but (1) this isn't strictly, exhaustively correct, and (2) for some inexplicable reason, this does not appear to work with Visual Studio Code.The previous workaround involved installing all the transitive dependencies in each consuming repo (despite the fact that 80% of the point of goodeggs-toolkit was avoiding this in the first place), e.g. https://github.com/goodeggs/garbanzo/pull/6787.
Changes
This pulls in a monkey-patch that alters the behavior of eslint's plugin resolution mechanism to behave the way it should.
I generally avoid monkey-patches like the plague, but:
To Do