`jsx-wrap-multiline` from `tslint-react` should be turned off
romandecker opened this issue · comments
Prettier does not wrap multiline-jsx in parens when it is the argument to a function, but the jsx-wrap-multiline
rule expects parens around EVERY multiline-jsx expression.
For example:
renderApp(
<Providers
apolloClient={apolloClient}
locale={locale}
messages={messages}
renderRouter={renderRouter}
/>,
document.getElementById('root'),
);
This is exactly how prettier would format the code with default settings, but it will make the jsx-wrap-multiline
rule fail, because it expects:
renderApp(
(<Providers
apolloClient={apolloClient}
locale={locale}
messages={messages}
renderRouter={renderRouter}
/>),
document.getElementById('root'),
);
It's already disabled. I guess you did not extend it correctly or the way you enabled that rule takes precedence over the extends
field, see #280 (comment) for more info.
Yep you were right, just in case someone runs into the same issue, the problem was, that we were using a base-tslint.json that had "extends": ["tslint:recommended", "tslint-config-prettier"]
and we extended THAT config with "extends": ["../../tslint.json", "tslint-react"]
, which caused tslint-react
to overrule tslint-config-prettier
again.
Had to re-add tslint-config-prettier
also to our extended config to make it work.