A Prettier plugin that sequentially applies the formatting results of other Prettier plugins.
Note: Prettier v3 is not yet supported.
npm install -D prettier@~2.8 prettier-plugin-merge
yarn add -D prettier@~2.8 prettier-plugin-merge
pnpm add -D prettier@~2.8 prettier-plugin-merge
Note: This plugin MUST come last. Other plugins usually have no order constraints.
JSON:
{
"plugins": [
"other-prettier-plugin-1",
"other-prettier-plugin-2",
"other-prettier-plugin-3",
"prettier-plugin-merge"
]
}
JS:
module.exports = {
plugins: [
require('other-prettier-plugin-1'),
require('other-prettier-plugin-2'),
require('other-prettier-plugin-3'),
require('prettier-plugin-merge'),
],
};