Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
tslint-config-prettier
Advanced tools
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.
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.
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"
]
}
`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` 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.
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.
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"
]
}
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"
]
}
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
.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Made with :heart: by @alexjoverm and all its contributors
FAQs
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.
The npm package tslint-config-prettier receives a total of 293,942 weekly downloads. As such, tslint-config-prettier popularity was classified as popular.
We found that tslint-config-prettier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.