⚠⚠⚠ ACHIEVED, moved into https://github.com/un-ts/prettier/tree/master/packages/toml
Use taplo to format your TOML files with Prettier.
$ npm install prettier-plugin-taplo -D
$ yarn add prettier-plugin-taplo -D
$ pnpm add prettier-plugin-taplo -D
// .prettierrc.js
module.exports = {
plugins: [
// Add this plugin to your prettier config
"prettier-plugin-taplo",
],
};
// .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.