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

react/jsx-curly-brace-presence {"children": "never"} doesn't error on multiline expressions #2201

Closed
mikeplis opened this issue Mar 15, 2019 · 2 comments · Fixed by #2409
Closed

Comments

@mikeplis
Copy link

"eslint": "^4.10.0",
"eslint-plugin-react": "^7.10.0",

Given this configuration:

'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }],

Unnecessary brackets will be detected when the start tag, children, and end tag are all on the same line, like:

<div className={styles.myRateValuePercentSign}>{'%'}</div>

but they won't be detected when they're on different lines, like:

<div className={styles.myRateValuePercentSign}>
    {'%'}
</div>

Is this the intended behavior?

Screen Shot 2019-03-15 at 10 59 45 AM

Screen Shot 2019-03-15 at 10 59 24 AM

@golopot
Copy link
Contributor

golopot commented May 7, 2019

@mikeplis
Copy link
Author

Is there an argument to just removing that check altogether?

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