{"library":"prettier-plugin-sort-imports-desc","title":"Prettier Plugin: Sort Imports (by length or alphabetically)","description":"A Prettier plugin that automatically sorts import statements by line length or alphabetically. V1.7.0 active, released for Prettier 2.x+ (Node.js 12+). Differentiators: supports sorting by import line length (unique feature), flexible import type ordering (NPM packages vs local values vs local types), newline stripping between groups, and ignore comments. Competitors like @trivago/prettier-plugin-sort-imports focus on alphabetical/group-based sorting and do not offer length-based sorting.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-sort-imports-desc"],"cli":null},"imports":["// Add to .prettierrc:\n{\n  \"plugins\": [\"prettier-plugin-sort-imports\"]\n}"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm install --save-dev prettier-plugin-sort-imports\n# Create .prettierrc with:\n{\n  \"plugins\": [\"prettier-plugin-sort-imports\"],\n  \"sortingMethod\": \"lineLength\",\n  \"stripNewlines\": true,\n  \"importTypeOrder\": [\"NPMPackages\", \"localImports\"],\n  \"newlineBetweenTypes\": true\n}","lang":"javascript","description":"Install plugin and configure Prettier to sort imports by length, strip newlines, and group NPM packages before local imports with a blank line between groups.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}