prettier / tslint-config-prettier

Use TSLint with Prettier without any conflict

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TSLint indent rule conflict

davad opened this issue · comments

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?

commented

We've already disabled this rule, I guess you probably

You should not add that rule, since Prettier already takes care of that. That's why this package disables it.