Skip to content

Conversation

@fisker
Copy link
Collaborator

@fisker fisker commented Nov 2, 2021

Fixes #1568

)
`,
'foo?.join()',
'foo.join?.()',
Copy link
Owner

@sindresorhus sindresorhus Nov 2, 2021

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