{"library":"prettier-stylelint-formatter","title":"prettier-stylelint-formatter","description":"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.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-stylelint-formatter"],"cli":{"name":"prettier-stylelint-formatter","version":null}},"imports":["const format = require('prettier-stylelint-formatter')","import prettierStylelint from 'prettier-stylelint-formatter'","npx prettier-stylelint --write \"**/*.css\""],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install: npm install prettier-stylelint-formatter --save-dev\n\n// API example\nconst format = require('prettier-stylelint-formatter');\nconst sourceCode = 'a[id=\"foo\"] { content: \"x\"; }';\nconst options = {\n  text: sourceCode,\n  // Optional: specify a stylelint config file path\n  // config: '/path/to/.stylelintrc'\n};\nconst formatted = format(options);\nconsole.log(formatted);\n// Output: a[id='foo'] {\n//     content: 'x';\n// }\n\n// CLI: npx prettier-stylelint --write \"src/**/*.css\"","lang":"javascript","description":"Demonstrates basic usage of the format API to lint and fix a CSS string, and the CLI command to process files.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}