TSLint indent rule conflict
davad opened this issue · comments
David Landry commented
By default, Prettier indents switch statements like this:
switch (variable) {
case "first":
break;
}
By default, TSLint's ter-indent rule expects indentation like this:
switch (variable) {
case "first":
break;
}
I was able to fix this by setting ter-indent's SwitchCase property (https://github.com/buzinas/tslint-eslint-rules/blob/master/src/docs/rules/terIndentRule.md).
Is this something tslint-config-prettier should be setting? Is it my own fault for having a 'ter-indent' rule to begin with?
Ika commented
We've already disabled this rule, I guess you probably
- did not put
tslint-config-prettier
at the end ofextends
, or - your
ter-indent
rule is defined in therules
field, which overrides rules fromextends
.
David Landry commented
Ahh, that would do it.
We added a ter-indent rule to change from 2 spaces to 4.
…On Thu, Aug 23, 2018 at 11:00 AM, Ika ***@***.***> wrote:
We've already disabled this rule
<https://github.com/alexjoverm/tslint-config-prettier/tree/master/src/tslint-eslint-rules/ter-indent>,
I guess you probably
- did not put tslint-config-prettier at the end of extends
<https://github.com/alexjoverm/tslint-config-prettier#get-started>, or
- your ter-indent rule is defined in the rules field, which overrides
rules from extends.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#181 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALnsylesb198DKj_oojaLEVvGlB7KHfks5uTsOJgaJpZM4WJsYn>
.
--
David Landry
Alex Jover commented
You should not add that rule, since Prettier already takes care of that. That's why this package disables it.