Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
stylelint-config-prettier
Advanced tools
Turns off all rules that are unnecessary or might conflict with Prettier.
The stylelint-config-prettier package is a configuration for Stylelint that disables all rules that are unnecessary or might conflict with Prettier. This allows you to use Stylelint for CSS linting and Prettier for code formatting without conflicts.
Disabling conflicting rules
By extending 'stylelint-config-prettier' in your Stylelint configuration, you disable all rules that might conflict with Prettier. This ensures that Prettier can handle code formatting while Stylelint focuses on linting.
{
"extends": [
"stylelint-config-prettier"
]
}
Combining with other configurations
You can combine 'stylelint-config-prettier' with other Stylelint configurations like 'stylelint-config-standard'. This allows you to use a standard set of linting rules while still avoiding conflicts with Prettier.
{
"extends": [
"stylelint-config-standard",
"stylelint-config-prettier"
]
}
eslint-config-prettier is a similar package for ESLint that turns off all rules that are unnecessary or might conflict with Prettier. It serves the same purpose as stylelint-config-prettier but for JavaScript and other languages supported by ESLint.
tslint-config-prettier is a configuration for TSLint that disables all rules that are unnecessary or might conflict with Prettier. It is similar to stylelint-config-prettier but is used for TypeScript linting.
prettier-stylelint is a package that formats your styles using Prettier followed by Stylelint --fix. It integrates both tools to ensure your styles are both formatted and linted correctly.
Note
As of Stylelint v15 all style-related rules have been deprecated. If you are using v15 or higher and are not making use of these deprecated rules, this plugin is no longer necessary.
Turns off all rules that are unnecessary or might conflict with Prettier. This lets you use your favorite shareable config without letting its stylistic choices get in the way when using Prettier.
Install stylelint-config-prettier
:
npm install --save-dev stylelint-config-prettier
Then, append stylelint-config-prettier
to the extends
array in your .stylelintrc.*
file. Make sure to put it last, so it will override other configs.
{
"extends": [
// other configs ...
"stylelint-config-prettier"
]
}
stylelint-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.
In order to execute the CLI tool, first add a script for it to package.json
:
{
"scripts": {
"stylelint-check": "stylelint-config-prettier-check"
}
}
Then run npm run stylelint-check
.
eslint-config-prettier
.tslint-config-prettier
.prettier-stylelint
.FAQs
Turns off all rules that are unnecessary or might conflict with Prettier.
The npm package stylelint-config-prettier receives a total of 454,639 weekly downloads. As such, stylelint-config-prettier popularity was classified as popular.
We found that stylelint-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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.