Skip to content

Conversation

@nzakas
Copy link
Member

@nzakas nzakas commented Nov 22, 2023

This switches FlatCompat to use the original (unnormalized) version of the plugin that was loaded from disk rather than the normalized version. This ensures that we'll avoid plugin redefinition errors when folks are using both FlatCompat and their own imports.

Fixes #135

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Nov 22, 2023
@nzakas
Copy link
Member Author

nzakas commented Nov 22, 2023

Looks like there's currently a problem with the GitHub CI services as it can't download Node.js. Will try re-running jobs in a bit.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI works now. Looks good, aside from one detail.

Comment on lines +112 to +113
definition: _ignore1, // eslint-disable-line no-unused-vars
original: _ignore2, // eslint-disable-line no-unused-vars
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like https://eslint.org/docs/latest/rules/no-unused-vars#varsignorepattern could be useful here, and then you can do something like

Suggested change
definition: _ignore1, // eslint-disable-line no-unused-vars
original: _ignore2, // eslint-disable-line no-unused-vars
definition: _,
original: __,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

TypeError: Cannot redefine plugin

4 participants