1. tslint-config-prettier
Do you wanna use tslint and prettier without conflicts? tslint-config-prettier disables all conflicting rules that may cause such problems. Prettier takes care of formatting and tslint the rest.
tslint-config-prettier
Package: tslint-config-prettier
Created by: prettier
Last modified: Wed, 12 Apr 2023 04:54:59 GMT
Version: 1.18.0
License: MIT
Downloads: 1,467,185
Repository: https://github.com/prettier/tslint-config-prettier

Install

npm install tslint-config-prettier
yarn add tslint-config-prettier

tslint-config-prettier

npm
Travis
downloads
dependencies Status
devDependencies Status

:cop: TSLint + :nail_care: Prettier = :heart_eyes:

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.

Check how it works in this tutorial.

Get started

 yarn add --dev tslint-config-prettier
# or
npm install --save-dev 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 yarn tslint-check or 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.

Related

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

Credits

Made with :heart: by @alexjoverm and all its contributors

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code