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

New rule suggestion: jsx-singleline-no-parens #206

Closed
dagerikhl opened this issue Feb 14, 2019 · 1 comment
Closed

New rule suggestion: jsx-singleline-no-parens #206

dagerikhl opened this issue Feb 14, 2019 · 1 comment
Labels
Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier Resolution: Declined

Comments

@dagerikhl
Copy link

A nice rule to have would be to prevent parantheses around singleline JSX. The inverse rule of jsx-wrap-multiline if you will.

// bad
const component = () => (<div>I should complain, but I don't.</div>);

// good
const component = () => <div>I'm not complaining.</div>;

Hope this would be possible to implement, would be a nifty addition!

@adidahiya
Copy link
Contributor

Might be useful, but we're not really interested in new formatting rules in this repo right now, as per palantir/tslint#4534. Could happily live in a custom ruleset outside this repo.

@adidahiya adidahiya added Resolution: Declined Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier labels Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier Resolution: Declined
Projects
None yet
Development

No branches or pull requests

2 participants