{"id":41770,"library":"prettier-markdown-table","title":"prettier-markdown-table","description":"A Prettier plugin that automatically formats tables in Markdown files by adjusting column widths and ensuring alignment. Version 1.0.3, released in 2024, requires Prettier ^3.3.2 and linguist-languages ^7.27.0. Unlike general prettier plugins, this focuses solely on Markdown tables, providing consistent formatting for tables with long content. It is a simple, single-purpose plugin without alternative table formatting tools in the npm ecosystem.","status":"active","version":"1.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/Alex-huxiyang/mdTable-format","tags":["javascript","prettier","table","markdown","format"],"install":[{"cmd":"npm install prettier-markdown-table","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-markdown-table","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-markdown-table","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency used for language detection","package":"linguist-languages","optional":true},{"reason":"peer dependency required as the host formatter","package":"prettier","optional":true}],"imports":[{"note":"The plugin is not imported in your code; it is loaded by Prettier via configuration.","wrong":"Using require() or import syntax inside .prettierrc is incorrect.","symbol":"default export","correct":"In .prettierrc, add \"prettier-markdown-table\" to the plugins array."}],"quickstart":{"code":"// .prettierrc\n{\n  \"trailingComma\": \"es5\",\n  \"tabWidth\": 2,\n  \"semi\": false,\n  \"plugins\": [\"prettier-markdown-table\"]\n}\n\n// Run prettier on a markdown file with a table:\n// echo \"| a | b | c |\" > test.md\n// npx prettier --write test.md\n// After formatting, the table will be aligned.","lang":"javascript","description":"Shows how to enable the plugin in .prettierrc and format a markdown file containing a table."},"warnings":[{"fix":"Ensure your file extension is .md or .markdown and that prettier is configured to parse it.","message":"Plugin only activates when Prettier processes markdown files; it will not affect non-markdown files.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update prettier to ^3.3.2 or later.","message":"The plugin requires Prettier v3.3.2 or newer. Using older versions will cause plugin loading failure.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.3':23 '2024':26 '3.3.2':29 '7.27.0':34 'adjust':16 'align':21 'altern':62 'automat':9 'column':17 'consist':46 'content':52 'ecosystem':69 'ensur':20 'file':14 'focus':40 'format':10,47,64,74 'general':36 'javascript':70 'languag':33 'linguist':32 'linguist-languag':31 'long':51 'markdown':3,13,43,73 'npm':68 'plugin':7,38,60 'prettier':2,6,28,37,71 'prettier-markdown-t':1 'provid':45 'purpos':59 'releas':24 'requir':27 'simpl':56 'singl':58 'single-purpos':57 'sole':41 'tabl':4,11,44,49,63,72 'tool':65 'unlik':35 'version':22 'width':18 'without':61","created_at":"2026-06-04T18:54:01.315490+00:00","updated_at":"2026-06-04T18:54:01.315490+00:00","problems":[{"fix":"Run 'npm install prettier-markdown-table' and ensure prettier is installed.","cause":"Plugin not installed or peer dependencies missing.","error":"Could not load plugin 'prettier-markdown-table'."},{"fix":"Run 'npm install linguist-languages' or ensure it is in your package.json.","cause":"Missing peer dependency linguist-languages.","error":"Cannot find module 'linguist-languages'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Alex-huxiyang/mdTable-format#readme","github":"https://github.com/Alex-huxiyang/mdTable-format","docs":null,"changelog":null,"pypi":null,"npm":"prettier-markdown-table","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}