Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSLint indent rule conflict #181

Closed
davad opened this issue Aug 23, 2018 · 3 comments
Closed

TSLint indent rule conflict #181

davad opened this issue Aug 23, 2018 · 3 comments

Comments

@davad
Copy link

davad commented Aug 23, 2018

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?

@ikatyang
Copy link
Member

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

@davad
Copy link
Author

davad commented Aug 23, 2018 via email

@alexjoverm
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants