Registry / testing / stylelint-config-prettier

stylelint-config-prettier

JSON →
library9.0.5jsnpmunverified

Turns off all Stylelint rules that are unnecessary or might conflict with Prettier, allowing you to use your favorite shareable Stylelint config without its stylistic choices interfering. Current stable version is 9.0.5, released January 2023. The package is maintained sporadically; it disables stylistic rules so Prettier can take over formatting. As of Stylelint v15 (released February 2023), the stylistic rules have been deprecated, making this package unnecessary for users on v15+ who do not use deprecated rules. It includes a CLI helper to check for conflicting rules. Peer dependency ranges: stylelint >= 11.x < 15.

npm install stylelint-config-prettier
INSTALL
IMPORT
SIG · STYLELINT-CONFIG-P
S
stylelint-config-prettier
testingjavascriptv9.0.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

config
module.exports = { extends: ['stylelint-config-prettier'] }
const config = require('stylelint-config-prettier')
Used in .stylelintrc.js as a string in extends array, not imported directly.
CLI check
Add script: "stylelint-check": "stylelint-config-prettier-check" and run npm run stylelint-check
Running npx stylelint-config-prettier-check without package.json script may fail if not in PATH.
CLI tool is not an importable module; it's a bin script.
CJS require in config
module.exports = { extends: ['stylelint-config-prettier'] }
module.exports = { extends: ['stylelint-config-prettier/index'] }
The package has no index.js; extending the package name suffices.

Shows how to install, extend the config (last place), and run the CLI check tool.

npm install --save-dev stylelint-config-prettier stylelint@14 # .stylelintrc.js module.exports = { extends: [ 'stylelint-config-standard', 'stylelint-config-prettier' ] }; // Check for conflicts: // Add to package.json scripts: "stylelint-check": "stylelint-config-prettier-check" // Run: npm run stylelint-check
stylelint-config-prettier --version
Debug
Known issues
deprecatedAs of Stylelint v15, all style-related rules have been deprecated. This package is unnecessary for users on v15+ who are not using deprecated rules.
fix
Remove stylelint-config-prettier from your extends array. Ensure your stylelint config does not rely on deprecated stylistic rules.
affects: >=15.0.0
breakingv9.0.0 drops some SCSS rules and sorts rules; may cause conflicts if SCSS plugin not installed.
fix
Install stylelint-scss plugin if using SCSS and updating from v8.
affects: >=9.0.0
gotchaMust be the last entry in the extends array to override other configs.
fix
Ensure 'stylelint-config-prettier' is appended after all other configs in extends.
affects: >=1.0.0
breakingv8.0.0 disables rules linebreaks, no-empty-first-line, and unicode-bom; min stylelint version bumped to 11.
fix
Update stylelint to v11+ and verify rules are disabled as expected.
affects: >=8.0.0
deprecatedv6.0.0 security release updated dependencies; older versions may have vulnerability.
fix
Update to v6.0.0 or later to get security fixes.
affects: <6.0.0
Errors
Common errors & fixes
Configuration for rule "color-no-invalid-hex" is invalid: Expected a boolean value
stylelint-config-prettier disables rules by setting them to null, which newer stylelint versions reject.
fix
Update to stylelint 14.x (or use stylelint-config-prettier v9+). In stylelint 15+, this package may not be needed.
Cannot find module 'stylelint-config-prettier'
Package may not be installed or node_modules path missing.
fix
Run npm install --save-dev stylelint-config-prettier. Check that it's listed in devDependencies.
cli: stylelint-config-prettier-check: command not found
The bin script is not in PATH, usually when using npx without a package.json script or without installing locally.
fix
Add a script in package.json: "stylelint-check": "stylelint-config-prettier-check" and run npm run stylelint-check.
Stylelint v15: Extending 'stylelint-config-prettier' has no effect since stylistic rules are deprecated.
After upgrading to stylelint v15, the package disables rules that are already deprecated.
fix
Remove stylelint-config-prettier from extends and update your stylelint config accordingly.
Upgrade
Version history
9.0.5latest on npm
Audit
Dependencies
stylelintrequiredPeer dependency; used to disable stylelint rules.
Agent activity
5 hits · last 30 days
node
4
Resources
stylelint-config-prettier — npm install stylelint-config-prettier · libregistry