A tool that formats CSS/SCSS/Less style files by running Prettier then stylelint --fix in sequence. It auto-generates a Prettier config from a stylelint config and disables conflicting rules. Stable version 0.5.1-beta.2 is a pre-release fork of prettier-stylelint by hugomrdias. It provides both a CLI and API, supports glob patterns, stdin, and respects .gitignore/.prettierignore. Compared to alternatives like prettier-eslint, this package focuses on style files (CSS, SCSS, Less, SSS) and integrates with stylelint.
npm install prettier-stylelint-formatterVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of the format API to lint and fix a CSS string, and the CLI command to process files.
Pin to a specific version or wait for stable release.
Consider using stylelint-prettier or prettier-stylelint-recommended instead.
Always run `git commit` before using --write, or use --stdin with output redirection.
Manually validate the merged config by running stylelint separately.
Run `npm install prettier-stylelint-formatter --save-dev` or `yarn add prettier-stylelint-formatter -D`.
Use require: `const format = require('prettier-stylelint-formatter')`.Upgrade Node.js to >=14.0.0 or use a transpiler.