Use TSLint with Prettier without any conflict (evacuated from NSA/Microsoft Github/NPM)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
greenkeeper[bot] 7f28941485
chore(package): update tslint-consistent-codestyle to version 1.13.1 (#153)
5 years ago
bin feat(checker): add ability to check multiple files at once (#127) 5 years ago
fixtures feat: add CLI helper tool 6 years ago
src feat(rules): add vrsource-tslint-rules/multiline-arrow 5 years ago
tools feat(checker): Do not output anything if there are no conflicting rules (#134) 5 years ago
.editorconfig chore: Set up project 6 years ago
.gitignore test: rewrite tests 6 years ago
.travis.yml chore(travis): preserve `npm install` (#151) 5 years ago
CONTRIBUTING.md Update CONTRIBUTING.md 6 years ago
LICENSE chore: Set up project 6 years ago
README.md Update README.md 5 years ago
package-lock.json chore(package): update tslint-consistent-codestyle to version 1.13.1 (#153) 5 years ago
package.json chore(package): update tslint-consistent-codestyle to version 1.13.1 (#153) 5 years ago
tsconfig.checker.json test: map coverage 5 years ago
tsconfig.json test: map coverage 5 years ago
tslint.json chore(rules): Add no-implicit-dependencies rule 5 years ago

README.md

tslint-config-prettier

npm Travis downloads David David Greenkeeper badge

👮 tslint + 💅 prettier = 😍

Do you want to use tslint and prettier without conflicts? tslint-config-prettier disables all conflicting rules that may cause such problems. Prettier takes care of the formatting whereas tslint takes care of all the other things.

Get started

npm install -D tslint-config-prettier

Make sure you've already set up tslint and prettier.

Then, extend your tslint.json, and make sure tslint-config-prettier is at the end:

{
  "extends": [
    "tslint:latest",
    "tslint-config-prettier"
  ]
}

More configuration

tslint-config-prettier also turns off formatting rules from the following rulesets, so you can use them safely.

{
  "extends": [
    "tslint:latest",
    "tslint-react",
    "tslint-eslint-rules",
    "tslint-config-prettier"
  ]
}

CLI helper tool

tslint-config-prettier is shipped with a little CLI tool to help you check if your configuration contains any rules that are in conflict with Prettier. (require tslint installed)

In order to execute the CLI tool, first add a script for it to package.json:

{
  "scripts": {
    "tslint-check": "tslint-config-prettier-check ./tslint.json"
  }
}

Then run npm run tslint-check.

Tutorials

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

  • tslint-plugin-prettier - Runs Prettier as a TSLint rule and reports differences as individual TSLint issues.

Credits

Made with ❤️ by @alexjoverm and all its contributors