{"library":"sass-formatter","title":"Sass Formatter","description":"Sass Formatter is a TypeScript-based utility for automatically formatting Sass, SCSS, CSS, and Less syntax files. It provides consistent code styling by correcting indentation, spacing, and other common formatting issues. The current stable version is 0.8.0, indicating it is still in active development with potential for minor breaking changes before a 1.0 release. It features both a programmatic API for integration into tools and a powerful command-line interface (CLI) for direct file processing and CI/CD pipelines. A key differentiator is its ability to convert CSS or SCSS to Sass syntax, alongside customizable formatting rules through a `.sassformatterrc.json` configuration file. It is notably used in the VS Code Sass extension. While a specific release cadence isn't published, the project is actively maintained with frequent updates.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install sass-formatter"],"cli":{"name":"sass-formatter","version":null}},"imports":["import { SassFormatter } from 'sass-formatter';","import { SassFormatterConfig } from 'sass-formatter';","import { defaultSassFormatterConfig } from 'sass-formatter';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { SassFormatter } from 'sass-formatter';\n\nconst unformattedSass = `\n// This is an unformatted Sass snippet\nspan\n  color: none\n  @for $i from 0 through 2\n    &:nth-child(#{$i})\n        color: none\n    @each $author in $list\n      .photo-#{$author}\n                background: image-url(\"avatars/#{$author}.png\") no-repeat\n\n@while $types > 0\n      .while-#{$types}\n width: $type-width + $types\n`;\n\nconsole.log('--- Original Sass ---');\nconsole.log(unformattedSass);\n\nconst formattedSass = SassFormatter.Format(unformattedSass);\n\nconsole.log('\\n--- Formatted Sass ---');\nconsole.log(formattedSass);\n","lang":"typescript","description":"Demonstrates how to import and use the `SassFormatter` class to format a Sass string programmatically and print the result.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}