prettier-stylelint (v0.4.2) is a tool that formats CSS/SCSS/Less files by first running Prettier and then stylelint --fix, using a generated Prettier config derived from your stylelint config. It aims to produce formatted code that also passes stylelint rules, eliminating the need for manual alignment. The package includes a stylelint config that disables conflicting rules. It should be considered experimental and unmaintained; the last release was in 2018. Key differentiators from alternatives like stylelint-prettier or Prettier's own stylelint plugin: it generates Prettier config from stylelint rules, whereas modern approaches typically use stylelint-config-prettier or run Prettier before stylelint. The project has not seen updates for 6+ years, and the API example shows a mistake (using prettier-eslint instead of prettier-stylelint). Not recommended for new projects.
npm install prettier-stylelintVerified import paths — ran on the pinned version, not inferred.
Demonstrates usage with stylelint config extension and the JavaScript API.
Use require('prettier-stylelint') as shown in the quickstart.Migrate to stylelint-prettier or stylelint-config-prettier combined with Prettier directly.
Do not use; consider alternatives.
Explicitly specify file patterns if needed.
Use `const format = require('prettier-stylelint');`Ensure package is installed and use `./node_modules/prettier-stylelint/config.js` or the correct path relative to your config.
Update to 0.4.2 or use pipe: `echo 'css' | prettier-stylelint`