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

require-array-join-separator: Check optional member #1569

Merged
merged 3 commits into from Nov 2, 2021

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Nov 2, 2021

Fixes #1568

@@ -71,5 +70,8 @@ test.snapshot({
)/**/
)
`,
'foo?.join()',
'foo.join?.()',
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think this should be invalid. Array#join is never optional, so if it is, it's a sign that it's a custom method and we should ignore it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right. I'll fix.

@fisker fisker changed the title require-array-join-separator: Check optional member and optional call require-array-join-separator: Check optional member Nov 2, 2021
@sindresorhus sindresorhus merged commit 15f9028 into sindresorhus:main Nov 2, 2021
@fisker fisker deleted the optional-join branch November 2, 2021 05:46
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.

require-array-join-separator doesn't work with optional chaining
2 participants