fix: work around eslint plugin sharing limitation #458
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