npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vscode-stylefmt

v2.9.1

Published

Modern CSS Formatter

Downloads

9

Readme

vscode-stylefmt

Build Status Build Status Dependencies GitHub release

stylefmt is a tool that automatically formats your stylesheets.

🍴 This is a WIP fork from mrmlnc/vscode-stylefmt which is currently obsolete. This version is in daily use and kept up to date.

Screen cap

🖌 Advantages over prettier/stylelint - why use stylefmt?

While you should definitely use stylelint for linting CSS/SCSS, its "source.fixAll.stylelint": true can't really fix all. This plugin will fix the rest, indentations and positions etc. Trust me, you want these both.

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.

Top contributors

This plugin is constantly kept up to date by the following persons and a bunch of awesome contributors. Wanna join in development? Let us know!

| Roni Laukkarinen | | --- | | Roni Laukkarinen |

Donation

Do you like this project? Support it by donating, creating an issue or pull request.

Donate

Install

  • Press F1 and select Extensions: Install Extensions.
  • Search for and select stylefmt.

See the extension installation guide for details.

Usage

  • You can use global keyboard shortcut ALT+SHIFT+F or right-click context menu Format code.
  • Or press F1 and run the command named stylefmt: Format CSS.

To automatically format on save, run Cmd+Shift+P (or CTRL+Shift+P on Windows systems) and select Preferences: Open Settings (JSON) and add this to your settings.json file:

"[scss]": {
    "editor.defaultFormatter": "ronilaukkarinen.vscode-stylefmt",
    "editor.formatOnSave": true
  },

Supported languages

  • CSS
  • PostCSS
  • Less
  • SCSS
  • SugarSS

Supported settings

configBasedir

  • Type: string
  • Default: null

Base working directory; useful for stylelint extends parameter.

config

  • Type: object || string
  • Default: null

Config object for stylelint or path to a stylelint config file.

Will automatically look for .stylelintrc and stylelint.config.js in workspace root, or a stylelint param in the package.json, if config is omitted.

Warning!

If you want to specify a file in the current directory, the path must begin with a ./ or ../ if relative to the current directory. Also you can use HOME directory as ~ symbol.

useStylelintConfigOverrides

  • Type: boolean
  • Default: false

Overrides rules using Stylelint plugin settings.

showErrorMessages

  • Type: boolean
  • Default: true

Show error messages or not. Will be automatically set to false if editor.formatOnSave is enabled.

Keyboard shortcuts

For changes keyboard shortcuts, create a new rule in File -> Preferences -> Keyboard Shortcuts:

{
  "key": "ctrl+shift+c",
  "command": "stylefmt.execute"
}

Custom configuration

Read about the stylelint rules and default rules in stylefmt repository.

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.