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

deprecated named imports #27

Merged
merged 1 commit into from
Jul 3, 2023
Merged

deprecated named imports #27

merged 1 commit into from
Jul 3, 2023

Conversation

stoyanovk
Copy link
Collaborator

No description provided.

@stoyanovk stoyanovk force-pushed the deprecated_named_imports branch 4 times, most recently from b131f6b to 1265610 Compare July 3, 2023 08:21
.map((module) => module.value.name);

imports
.filter((imp) => imp.check(requireArg.value, new Set(namedImports)))
Copy link
Owner

Choose a reason for hiding this comment

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

creating Set from array is O(n) operation, better to use it outside of the filter func

imports
.filter((imp) => imp.check(importPath))
.filter((imp) => imp.check(importPath, new Set(importedModules)))
Copy link
Owner

Choose a reason for hiding this comment

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

creating Set from array is O(n) operation, better to use it outside of the filter func

code: 'const redirect = require("gatsby").redirect',
parser: 'babel-eslint',
options: [{ module: 'gatsby', name: 'navigate', use: 'utils/navigate' }],
errors: [{
Copy link
Owner

@AlexMost AlexMost Jul 3, 2023

Choose a reason for hiding this comment

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

Does this error make sense here? Error cases must be inside the invalid section

@stoyanovk stoyanovk force-pushed the deprecated_named_imports branch from 1265610 to bc65942 Compare July 3, 2023 09:15
@AlexMost
Copy link
Owner

AlexMost commented Jul 3, 2023

Thanks a lot, this PR fixes this issue - #16

@AlexMost AlexMost closed this Jul 3, 2023
@AlexMost AlexMost reopened this Jul 3, 2023
@AlexMost AlexMost merged commit bab756f into master Jul 3, 2023
@AlexMost
Copy link
Owner

AlexMost commented Jul 3, 2023

the new minor version is available 0.8.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants