You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and my issue is unique
My issue appears in the command-line and not only in the text editor
Description Overview
When using 'react/jsx-no-leaked-render': ['error', { validStrategies: ['coerce', 'ternary'] }], and running eslint --fix the resulting code changes go beyond what's required for the actual fix by also removing parentheses, causing excessive code diffs.
I would expect the second hunk to be a single line change, just like the first hunk. Running this fix across a large codebase is unfeasible because the changes cannot be human-verified.
eslint --fix with 'react/jsx-no-leaked-render': ['error', { validStrategies: ['coerce', 'ternary'] }],
Expected Behavior
I'd expect no parentheses would be removed and no code-style to change. Other than the !! required to fix the issue, nothing else at all should change in the code.
eslint-plugin-react version
7.21.5
eslint version
8.35.0
node version
16.13.1
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Description Overview
When using
'react/jsx-no-leaked-render': ['error', { validStrategies: ['coerce', 'ternary'] }],
and runningeslint --fix
the resulting code changes go beyond what's required for the actual fix by also removing parentheses, causing excessive code diffs.I would expect the second hunk to be a single line change, just like the first hunk. Running this fix across a large codebase is unfeasible because the changes cannot be human-verified.
eslint --fix
with'react/jsx-no-leaked-render': ['error', { validStrategies: ['coerce', 'ternary'] }],
Expected Behavior
I'd expect no parentheses would be removed and no code-style to change. Other than the
!!
required to fix the issue, nothing else at all should change in the code.eslint-plugin-react version
7.21.5
eslint version
8.35.0
node version
16.13.1
The text was updated successfully, but these errors were encountered: