{"library":"prettier-stylelint","title":"prettier-stylelint","description":"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.","language":"javascript","status":"abandoned","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-stylelint"],"cli":{"name":"prettier-stylelint","version":null}},"imports":["const format = require('prettier-stylelint')","const format = require('prettier-stylelint')","require('prettier-stylelint/config')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install: npm install prettier-stylelint --save-dev\n\n// In your stylelint config (.stylelintrc or package.json)\n{\n  \"extends\": [\n    \"./node_modules/prettier-stylelint/config.js\"\n  ],\n  \"rules\": {\n    \"indentation\": 4,\n    \"string-quotes\": \"single\"\n  }\n}\n\n// Then run CLI:\n// npx prettier-stylelint --write \"src/**/*.css\"\n\n// Or use the API:\nconst format = require('prettier-stylelint');\nconst sourceCode = 'a[id=\"foo\"] { content: \"x\"; }';\nconst options = {\n  text: sourceCode\n};\nconst formatted = format(options);\nconsole.log(formatted);\n// Output:\n// a[id='foo'] {\n//     content: 'x';\n// }","lang":"javascript","description":"Demonstrates usage with stylelint config extension and the JavaScript API.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}