{"library":"prettier-plugin-organize-attributes","title":"prettier-plugin-organize-attributes","description":"Prettier plugin to automatically organize HTML attributes in a configurable order. Version 1.0.0, stable, actively maintained. Supports Angular, Vue, and plain HTML with zero configuration. Allows custom attribute groups via regex or presets, attribute sorting (ASC/DESC), and case-insensitive matching. Key differentiator: structured group-based ordering rather than simple alphabetical, with built-in presets for popular frameworks. Requires Prettier ^3.0.0.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-organize-attributes"],"cli":null},"imports":["// add to .prettierrc: { \"plugins\": [\"prettier-plugin-organize-attributes\"] }","// .prettierrc\n{ \"attributeGroups\": [\"^class$\", \"$DEFAULT\"] }","// .prettierrc\n{ \"attributeSort\": \"ASC\" }"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install\nnpm install --save-dev prettier prettier-plugin-organize-attributes\n\n// .prettierrc\n{\n  \"plugins\": [\"prettier-plugin-organize-attributes\"],\n  \"attributeGroups\": [\"^class$\", \"^id$\", \"$DEFAULT\"],\n  \"attributeSort\": \"ASC\"\n}\n\n// Input: index.html\n<div id=\"myid\" class=\"myclass\" src=\"img.jpg\"></div>\n\n// Run: npx prettier --write index.html\n// Output:\n// <div class=\"myclass\" id=\"myid\" src=\"img.jpg\"></div>","lang":"typescript","description":"Shows installation, configuration with custom groups and sorting, and a run example.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}