-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Remove useless spread and fallbacks #249
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
The CI error seems to be from the main branch, I will fix that later. |
@@ -95,7 +95,7 @@ export function extractGeneric(element: VElement): GenericProcessInfo | null { | |||
typeDefScope: Scope, | |||
isRemoveTarget: (nodeOrToken: HasLocation) => boolean, | |||
) { | |||
for (const variable of [...typeDefScope.variables]) { | |||
for (const variable of typeDefScope.variables) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just sharing, we had to copy the original array because it might be modified, so we'll undo this modification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, sorry about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests should have caught that, but it seems I broke them. Sorry 😅
Was reading code, and found some cases that unicorn can prevent.
If you don't want keep the rules, I can remove them.
BTW: The eslint config seems not working right, when I run
eslint --fix
, there are more change (some are wrong) applied, maybe because of version of dependencies.