vscode-stylefmt
🍴 This is a WIP fork from mrmlnc/vscode-stylefmt which is currently obsolete. This version is in daily use and kept up to date. 🖌 Advantages over prettier/stylelint - why use stylefmt?While you should definitely use stylelint for linting CSS/SCSS, its What about Prettier? Well, it forces styles to a certain format and it doesn't give you much options. It's tricky especially with SCSS mixins and map-gets where it may even break the formatting completely by forcibly lining them up into a single line. The official stylefmt package has not been updated since on 18 Oct 2018. However, there are still users who like to format their styles automatically and controlled with stylefmt so that's why this plugin relies on a forked npm package, @ronilaukkarinen/stylefmt. The main goal is to keep this project active and alive. The best thing in stylefmt is that it supports stylelint out-of-the-box without being too restrictive. So, in short: Practically this extension removes extra empty lines and indents the code to match the current indentation level. It does it a bit more efficiently than stylelint itself. Top contributorsThis plugin is constantly kept up to date by the following persons and a bunch of awesome contributors. Wanna join in development? Let us know!
DonationDo you like this project? Support it by donating, creating an issue or pull request. Install
See the extension installation guide for details. Usage
To automatically format on save, run Cmd+Shift+P (or CTRL+Shift+P on Windows systems) and select
Supported languages
Supported settingsconfigBasedir
Base working directory; useful for stylelint config
Config object for stylelint or path to a stylelint config file. Will automatically look for
useStylelintConfigOverrides
Overrides rules using Stylelint plugin settings. showErrorMessages
Show error messages or not. Will be automatically set to false if Keyboard shortcutsFor changes keyboard shortcuts, create a new rule in
Custom configurationRead about the stylelint rules and default rules in stylefmt repository. ChangelogSee the Releases section of our GitHub project for changelogs for each release version. LicenseThis software is released under the terms of the MIT license. |