I am using ESLint with the prettier plugin and configuration:
// eslintrc.js
extends: [
`eslint:recommended`,
`plugin:react/recommended`,
`plugin:@typescript-eslint/recommended`,
`plugin:prettier/recommended`,
`prettier/react`,
`prettier/@typescript-eslint`
]
This works great, but I would like to disable a certain prettier rule, which is removing "unneeded" parentheses (removing them actually breaks my code):
// Replace `(state.counter)` with `state.counter` eslint(prettier/prettier)
return <div>{(state.counter)}</div>
As you can see from the message above, it doesn't state which rule exactly is causing this behavior and therefore I don't know which one to override.
I have tried to override all rules found in eslint-prettier-config, but nothing worked and I don't want to keep using // eslint-disable-next-line prettier/prettier
.