{"library":"prettier-plugin-sort-markdown-table","title":"prettier-plugin-sort-markdown-table","description":"Prettier plugin that sorts the rows of markdown tables alphabetically by the first column. Current stable version is 2.0.0, released May 2025, with a slow release cadence. Requires Prettier 3.x. Table sorting is opt-in: only tables preceded by a `<!-- prettier-sort-markdown-table -->` comment are sorted. Key differentiator: minimal configuration — just drop in and annotate — unlike other markdown formatters that require manual sorting.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-sort-markdown-table"],"cli":null},"imports":["plugins: [require('prettier-plugin-sort-markdown-table')]","export default { plugins: ['prettier-plugin-sort-markdown-table'] }","npx prettier --plugin=prettier-plugin-sort-markdown-table --write README.md"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm i -D prettier prettier-plugin-sort-markdown-table\n\ncat > .prettierrc.js << 'EOF'\nmodule.exports = {\n  plugins: ['prettier-plugin-sort-markdown-table'],\n};\nEOF\n\ncat > README.md << 'EOF'\n<!-- prettier-sort-markdown-table -->\n| name | email |\n| ---- | ----- |\n| zhang | zhang@a.com |\n| wang | wang@a.com |\n| alice | alice@example.com |\nEOF\n\nnpx prettier --write README.md\n\n# Output README.md rows sorted by first column alphabetically: alice, wang, zhang","lang":"typescript","description":"Installs the plugin, configures Prettier to load it automatically, then formats a markdown table with the opt-in comment.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}