Registry / devops / prettier-plugin-ini

prettier-plugin-ini

JSON →
library1.3.0jsnpmunverified

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.

npm install prettier-plugin-ini
INSTALL
IMPORT
SIG · PRETTIER-PLUGIN-IN
P
prettier-plugin-ini
devopsjavascriptv1.3.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import prettier from 'prettier'
✗ const prettier = require('prettier')
Prettier and its plugins are typically used via CLI, but programmatic usage in ESM is possible.
ensureEndOfLine
✓ import { ensureEndOfLine } from 'prettier-plugin-ini'
Internal utility; not typically imported directly.

Shows installation, CLI usage, and programmatic formatting with the plugin.

// Install: npm install --save-dev prettier prettier-plugin-ini // Format INI files via CLI: // prettier --write '**/*.ini' // Or with options: // prettier --ini-space-around-equals --tab-width 4 --write 'config.ini' // Programmatic usage (ESM): import prettier from 'prettier'; const code = `[section] key=value`; const formatted = await prettier.format(code, { parser: 'ini', plugins: ['prettier-plugin-ini'], iniSpaceAroundEquals: true, tabWidth: 2 }); console.log(formatted);
prettier --version
Debug
Known issues
gotchaPlugin requires Prettier v2+; using with older Prettier may fail silently.
fix
Update Prettier to version 2.x or higher.
affects: >=1.0.0
gotchaThe iniSpaceAroundEquals option can break compatibility with tools that expect no spaces around equals.
fix
Ensure your configuration aligns with downstream parsers.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'prettier-plugin-ini'
Plugin not installed or not in node_modules.
fix
Run npm install --save-dev prettier-plugin-ini and ensure it's in your project.
No parser specified for file extension '.ini'
Prettier not configured to use the plugin for INI files.
fix
Add the plugin to your Prettier config: { "plugins": ["prettier-plugin-ini"] }
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies
prettierrequiredpeer dependency; plugin requires Prettier to be installed
Agent activity
2 hits · last 30 days
node
2
Resources
prettier-plugin-ini — npm install prettier-plugin-ini · libregistry