{"id":20374,"library":"prettier-plugin-ini","title":"prettier-plugin-ini","description":"A Prettier plugin for formatting INI configuration files. Current stable version is 1.3.0, released under the MIT License. It integrates seamlessly with the Prettier ecosystem and supports common formatting options such as printWidth, tabWidth, and a unique iniSpaceAroundEquals option for adding spaces around equals signs. It is actively maintained on GitHub and follows Prettier's release cadence. Compared to alternative INI formatters, it leverages Prettier's robust parser infrastructure and editor integrations, ensuring consistent styling across projects.","status":"active","version":"1.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/kddnewton/prettier-plugin-ini","tags":["javascript"],"install":[{"cmd":"npm install prettier-plugin-ini","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-plugin-ini","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-plugin-ini","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin requires Prettier to be installed","package":"prettier","optional":false}],"imports":[{"note":"Prettier and its plugins are typically used via CLI, but programmatic usage in ESM is possible.","wrong":"const prettier = require('prettier')","symbol":"default","correct":"import prettier from 'prettier'"},{"note":"Internal utility; not typically imported directly.","symbol":"ensureEndOfLine","correct":"import { ensureEndOfLine } from 'prettier-plugin-ini'"}],"quickstart":{"code":"// Install: npm install --save-dev prettier prettier-plugin-ini\n// Format INI files via CLI:\n// prettier --write '**/*.ini'\n// Or with options:\n// prettier --ini-space-around-equals --tab-width 4 --write 'config.ini'\n\n// Programmatic usage (ESM):\nimport prettier from 'prettier';\nconst code = `[section]\nkey=value`;\nconst formatted = await prettier.format(code, {\n  parser: 'ini',\n  plugins: ['prettier-plugin-ini'],\n  iniSpaceAroundEquals: true,\n  tabWidth: 2\n});\nconsole.log(formatted);","lang":"typescript","description":"Shows installation, CLI usage, and programmatic formatting with the plugin."},"warnings":[{"fix":"Update Prettier to version 2.x or higher.","message":"Plugin requires Prettier v2+; using with older Prettier may fail silently.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure your configuration aligns with downstream parsers.","message":"The iniSpaceAroundEquals option can break compatibility with tools that expect no spaces around equals.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev prettier-plugin-ini and ensure it's in your project.","cause":"Plugin not installed or not in node_modules.","error":"Cannot find module 'prettier-plugin-ini'"},{"fix":"Add the plugin to your Prettier config: { \"plugins\": [\"prettier-plugin-ini\"] }","cause":"Prettier not configured to use the plugin for INI files.","error":"No parser specified for file extension '.ini'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}