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

button-has-type: support trivial ternary expressions #2748

Merged
merged 1 commit into from Aug 13, 2020

Conversation

Hypnosphi
Copy link
Contributor

This adds support for trivial ternary expressions to button-has-type rule:

<button type={condition ? 'button' : 'submit'} />

See #1555 (comment)

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks, this is great - let's make sure that static strings work when double, single, or backtick-quoted.

tests/lib/rules/button-has-type.js Show resolved Hide resolved
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks! I'm going to pull in a few more bugfixes and cut a patch release before landing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants