Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
generated from so1ve/starter-node

Use taplo to format your TOML files with Prettier.

License

Notifications You must be signed in to change notification settings

so1ve/prettier-plugin-taplo

Repository files navigation


prettier-plugin-taplo

NPM version

Use taplo to format your TOML files with Prettier.

📦 Installation

$ npm install prettier-plugin-taplo -D
$ yarn add prettier-plugin-taplo -D
$ pnpm add prettier-plugin-taplo -D

🚀 Usage

// .prettierrc.js
module.exports = {
	plugins: [
		// Add this plugin to your prettier config
		"prettier-plugin-taplo",
	],
};

🎶 Options

// .prettierrc.js
module.exports = {
	taploAlignEntries: false,
	taploAlignComments: true,
	taploArrayAutoExpand: true,
	taploArrayAutoCollapse: true,
	taploCompactArrays: true,
	taploCompactInlineTables: false,
	taploCompactEntries: false,
	taploIndentTables: false,
	taploIndentEntries: false,
	taploReorderKeys: false,
};

Checkout ./src/options.ts for more information.

📝 License

MIT. Made with ❤️ by Ray