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

Refactor to use simple selectors #2116

Merged
merged 12 commits into from
May 17, 2023

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented May 16, 2023

No description provided.

|| isMethodCall({
methods: ['getAttribute', 'removeAttribute', 'hasAttribute'],
argumentsLength: 1
optionalCall: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, why not just make this the default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What if we want ignore optionalCall check

isMethodCall({
	optionalCall: undefined
})

? Odd to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe introduce another flag?

isMethodCall(node, {
	checkOptionalCall: false
})

@fisker fisker marked this pull request as ready for review May 16, 2023 13:52
@fisker fisker merged commit f9ed3e1 into sindresorhus:main May 17, 2023
22 checks passed
@fisker fisker deleted the no-object-as-default-parameter branch May 17, 2023 01:52
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.

None yet

2 participants