What is tslint-config-prettier?
The `tslint-config-prettier` package is a TSLint configuration that disables all rules that are unnecessary or might conflict with Prettier. This allows you to use TSLint for code quality checks while letting Prettier handle code formatting.
What are tslint-config-prettier's main functionalities?
Disable conflicting rules
By extending `tslint-config-prettier` in your TSLint configuration, you disable all TSLint rules that might conflict with Prettier, ensuring that the two tools work together seamlessly.
{
"extends": [
"tslint-config-prettier"
]
}
Integration with existing TSLint configurations
You can integrate `tslint-config-prettier` with your existing TSLint configurations. This example shows how to extend both `tslint:recommended` and `tslint-config-prettier` to use recommended TSLint rules while avoiding conflicts with Prettier.
{
"extends": [
"tslint:recommended",
"tslint-config-prettier"
]
}
Other packages similar to tslint-config-prettier
eslint-config-prettier
`eslint-config-prettier` is an ESLint configuration that disables all rules that are unnecessary or might conflict with Prettier. It serves a similar purpose as `tslint-config-prettier` but is used with ESLint instead of TSLint.
stylelint-config-prettier
`stylelint-config-prettier` is a Stylelint configuration that disables all rules that are unnecessary or might conflict with Prettier. It is used for CSS and other style-related linting, ensuring compatibility with Prettier.
tslint-config-prettier
:cop: tslint + :nail_care: prettier = :heart_eyes:
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.
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 tslint-react and tslint-eslint-rules, so you can use them safely.
{
"extends": [
"tslint:latest",
"tslint-react",
"tslint-eslint-rules",
"tslint-config-prettier"
]
}
Contributing
git clone https://github.com/YOUR-USERNAME/tslint-config-prettier
npm install
This project uses semantic-release to keep a clean CI/CD pipe.
So, you only will be required to follow conventional-commit messages. Everything else happens magically.
Credits
Made with :heart: by @alexjoverm and all its contributors