{"library":"prettier-plugin-sh","title":"prettier-plugin-sh","description":"An opinionated shell script formatter for Prettier, extending support to Dockerfile, .properties, .gitignore, .env, hosts, and JVM options files. Current stable version is 0.18.1, maintained actively with minor updates every few months. It leverages mvdan-sh and dockerfmt under the hood, providing a consistent shell formatting experience within Prettier's ecosystem. Unlike standalone shell formatters, it integrates seamlessly with Prettier's plugin system and respects project-wide formatting configuration. Supports Prettier ^3.6.0 and Node 16+. Ships TypeScript definitions.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-sh"],"cli":null},"imports":["// Plugin is auto-loaded by Prettier when listed in .prettierrc\n// No manual import needed in typical usage.\n// If dynamic configuration is needed, use:\nimport plugin from 'prettier-plugin-sh'","import type { ShOptions } from 'prettier-plugin-sh';","import { LangVariant } from 'prettier-plugin-sh';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// .prettierrc\n{\n  \"plugins\": [\"prettier-plugin-sh\"],\n  \"overrides\": [\n    {\n      \"files\": [\"*.sh\", \"*.bash\"],\n      \"options\": {\n        \"parser\": \"sh\",\n        \"tabWidth\": 4\n      }\n    }\n  ]\n}\n\n// Then run:\n// npx prettier --write script.sh\n// The plugin automatically formats shell scripts with consistent indentation, quotes, and line breaks.","lang":"typescript","description":"Configuration to enable shell script formatting via Prettier using the prettier-plugin-sh plugin. Shows setup in .prettierrc and basic CLI usage.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}