Prettier plugin (v1.0.1) that sorts CSS/SCSS property declarations and groups related properties together. It enforces a consistent order (e.g., positioning, box model, typography, visual) without requiring a separate linter like stylelint. Minimal configuration—just install. Compatible with Prettier >=2.0.0. Releases are infrequent; last updated in 2021. Differentiators: zero config, works as a Prettier plugin, no postcss dependency.
npm install prettier-plugin-two-style-orderVerified import paths — ran on the pinned version, not inferred.
Installs dependencies, creates minimal Prettier config, and runs the plugin on a CSS file to sort properties.
Use an alternative like prettier-plugin-style-order or stick to Prettier v2.
Check compatibility with your Prettier version or switch to actively maintained plugin.
If you need custom ordering, use a configurable plugin like prettier-plugin-style-order or stylelint.
Install the correct package: npm i -D prettier-plugin-two-style-order
Use stylelint or other tools for Less/other syntaxes.
Run: npm install --save-dev prettier-plugin-two-style-order
Remove any styleOrder or similar keys from .prettierrc; the plugin has no config.
Downgrade Prettier to v2 or switch to a compatible plugin.
Fix the CSS syntax error; only valid CSS/SCSS is processed.