palantir / tslint-react

:orange_book: Lint rules related to React & JSX for TSLint.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whats rule for indents?

js2me opened this issue · comments

Hi everyone, I found a problem using tslint with tslint-react configuration.
It have rules for whitespaces for the react elements?
image

Can you provide more information here? What is your expected input and output?

@johnwiseheart solved. It was my bad

Thanks, tslint-config-prettier helps me!

List of my tslint dev-dependencies:

  "tslint": "^5.12.1",
  "tslint-config-airbnb": "^5.11.1",
  "tslint-plugin-prettier": "^2.0.1",
  "tslint-react": "^3.6.0",

My tslint.json:

{
  "defaultSeverity": "error",
  "extends": [
    "tslint-config-airbnb",
    "tslint-react",
    "tslint-plugin-prettier"
  ],
  "jsRules": {},
  "rules": {
    "prettier": [
      true,
      {
        "singleQuote": true,
        "trailingComma": "all"
      }]
  },
  "rulesDirectory": []
}

Some default rules of prettier may conflict with extended. You will need to reassign them inside of prettier config to avoid permanent errors.

Result:
image