diff --git a/.changeset/fifty-seals-join.md b/.changeset/fifty-seals-join.md new file mode 100644 index 0000000..1a2aec3 --- /dev/null +++ b/.changeset/fifty-seals-join.md @@ -0,0 +1,5 @@ +--- +"@robino/prettier": patch +--- + +Adds `prettier-plugin-css-order` diff --git a/package-lock.json b/package-lock.json index ea16da2..2160c0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1800,6 +1800,18 @@ "which": "^1.2.9" } }, + "node_modules/css-declaration-sorter": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", + "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", + "license": "ISC", + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, "node_modules/debug": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", @@ -2597,7 +2609,6 @@ "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, "funding": [ { "type": "github", @@ -2819,7 +2830,6 @@ "version": "8.4.41", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -2844,6 +2854,44 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-less": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-6.0.0.tgz", + "integrity": "sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "postcss": "^8.3.5" + } + }, + "node_modules/postcss-scss": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-scss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.4.29" + } + }, "node_modules/preferred-pm": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.1.4.tgz", @@ -2940,6 +2988,23 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-css-order": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/prettier-plugin-css-order/-/prettier-plugin-css-order-2.1.2.tgz", + "integrity": "sha512-vomxPjHI6pOMYcBuouSJHxxQClJXaUpU9rsV9IAO2wrSTZILRRlrxAAR8t9UF6wtczLkLfNRFUwM+ZbGXOONUA==", + "license": "ISC", + "dependencies": { + "css-declaration-sorter": "^7.1.1", + "postcss-less": "^6.0.0", + "postcss-scss": "^4.0.9" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "prettier": "3.x" + } + }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -3175,7 +3240,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", - "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -3747,7 +3811,8 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.3.0" + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "prettier-plugin-css-order": "^2.1.2" }, "devDependencies": { "@robino/tsconfig": "*" @@ -3762,7 +3827,7 @@ }, "packages/tsconfig": { "name": "@robino/tsconfig", - "version": "0.1.1", + "version": "0.2.1", "license": "MIT", "dependencies": { "@types/node": "^22.5.0" diff --git a/packages/prettier/package.json b/packages/prettier/package.json index c8c00f6..2a14e6b 100644 --- a/packages/prettier/package.json +++ b/packages/prettier/package.json @@ -19,7 +19,8 @@ "prettier": "^3.3.3" }, "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.3.0" + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "prettier-plugin-css-order": "^2.1.2" }, "devDependencies": { "@robino/tsconfig": "*" diff --git a/packages/prettier/src/index.js b/packages/prettier/src/index.js index 8d5c20a..855443a 100644 --- a/packages/prettier/src/index.js +++ b/packages/prettier/src/index.js @@ -2,5 +2,8 @@ export default { useTabs: true, htmlWhitespaceSensitivity: "ignore", - plugins: ["@trivago/prettier-plugin-sort-imports"], + plugins: [ + "@trivago/prettier-plugin-sort-imports", + "prettier-plugin-css-order", + ], };