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

no-useless-undefined: Ignore arguments in Function#bind() #1762

Merged
merged 3 commits into from Mar 29, 2022

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Mar 29, 2022

Ignore foo.bind(bar, undefined), but not foo.bind(undefined), because foo.bind() and foo.bind(undefined) are the same.

I also ignored foo?.bind(bar, undefined), but not foo.bind?.(bar, undefined) doesn't make sense to use optional chaining here.

Fixes #1738

@sindresorhus sindresorhus merged commit c501243 into sindresorhus:main Mar 29, 2022
@fisker fisker deleted the bind-arguments branch March 29, 2022 08:49
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.

[no-useless-undefined] incorrect fix for fn.bind(undefined, undefined)
2 participants