prettier / tslint-plugin-prettier

Runs Prettier as a TSLint rule and reports differences as individual TSLint issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

readme.md seems wrong about configuration

vincentpalita opened this issue · comments

The readme shows following configuration. It's in fact the opposite. Shall I open a pull request to fix that?

for tslint@^5.2.0

{
  "rulesDirectory": ["tslint-plugin-prettier"],
  "rules": {
    "prettier": true
  }
}

for tslint@^5.0.0

{
  "extends": ["tslint-plugin-prettier"],
  "rules": {
    "prettier": true
  }
}
commented

What did you mean by opposite? The rulesDirectory field is preferred over extends but it only works for TSLint 5.2.0+.

Well just tried it with tslint 6.1.1 and it didn't work until I put it in extends.

commented

We use the same config in this repo:

"tslint": "6.1.1",

"rulesDirectory": ["tslint-plugin-prettier"],

I just tested it locally with tslint-plugin-prettier@2.3.0 and it did work on my machine. Could you share some steps to reproduce?

Well I am sorry for the trouble, I tried again after removing all node modules and it is working with rulesDirectory instead of extends.

Thanks for your help @ikatyang !