Closed Alexendoo closed 7 years ago
Do you know what rule that is? Most likely it hasn't been implemented for TSLint.
Seems to be from the tslint curly rule
Doesn't look like there's a way to do it like eslint as it stands unfortunately, there's a request for it though https://github.com/palantir/tslint/issues/822
I just disable curly for now in my tslint.json
Thanks, I see it now. Yeah, TSLint only has the one option (https://palantir.github.io/tslint/rules/curly/) while ESLint has multiple (http://eslint.org/docs/rules/curly). Rule in StandardJS (https://github.com/feross/eslint-config-standard/blob/c879dfb71e03739a45e980687f9a28c94b4a95d2/eslintrc.json#L37).
this bit me too. i feel like the more tolerant ruling here is more accommodating? that is, can we disable https://github.com/blakeembrey/tslint-config-standard/blob/master/tslint.js#L46?
I won't be disabling it as it's more likely to catch issues with missing braces, and that's the goal of linting.
sure, but the goal of this project is to apply standardjs linting, however this rule declares my valid standardjs formatted code as invalid.
Just disable it in your own tslint.json
then. I won't disable it here, which I just said. It is applying StandardJS linting as close as it can get - it just can't apply this rule as it doesn't exist, and deleting it would mean projects deviate even further away from StandardJS. It's likely there's other rules that cause deviation (e.g. indent) that I would enable if it got me 90% parity with ESLint.
This is supported with https://github.com/blakeembrey/tslint-config-standard/releases/tag/v5.0.0.
e.g.
if (...) return
Currently it throws a warning