Registry / devops / volar-service-sass-formatter

volar-service-sass-formatter

JSON →
library0.0.71jsnpmunverified

A Volar plugin that integrates sass-formatter (the Sass formatting library) into the Volar language service framework. Current stable version is 0.0.71. This package is part of the volar-services ecosystem and is used to enable Sass/SCSS formatting in editors like VS Code when using the Vue Language Features extension. It is maintained by the Volar team and follows the release cadence of Volar core. Key differentiator: allows formatting of Sass/SCSS files within Vue SFCs and other contexts where Volar is the language provider.

npm install volar-service-sass-formatter
INSTALL
IMPORT
SIG · VOLAR-SERVICE-SASS
V
volar-service-sass-formatter
devopsjavascriptv0.0.71
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create
import { create } from 'volar-service-sass-formatter'
const create = require('volar-service-sass-formatter').create
ESM import works in modern TypeScript/Node.js environments. CJS require is also supported but the package is ESM-first.
default
import volarServiceSassFormatter from 'volar-service-sass-formatter'
import { default as create } from 'volar-service-sass-formatter'
Default export is the 'create' function. Named import is preferred.
create
const { create } = require('volar-service-sass-formatter')
const create = require('volar-service-sass-formatter')
CJS destructuring is needed because the package exports create as a named export, not a default export.

Shows how to use volar-service-sass-formatter in a Volar configuration file to enable Sass formatting.

// volar.config.js const { create } = require('volar-service-sass-formatter'); module.exports = { services: [ create(), ], };
Debug
Known issues
gotchaPackage requires volar-service-sass-formatter to be installed alongside @volar/language-service version ~2.4.0. Incompatible versions will cause runtime errors.
fix
Ensure @volar/language-service is at version ~2.4.0 in your project.
affects: >=0.0.1
gotchaThe package only provides formatting for Sass/SCSS files. It does not include syntax highlighting or other language features.
fix
Install additional Volar services if you need completions, diagnostics, etc.
affects: >=0.0.1
gotchaThe 'create' function may accept options (not documented here). Check the source or sass-formatter documentation for available options.
fix
Refer to sass-formatter's options and pass them as an object to create().
affects: >=0.0.1
Errors
Common errors & fixes
Cannot find module 'volar-service-sass-formatter'
Package not installed or not in node_modules.
fix
Run 'npm install volar-service-sass-formatter'.
Error: The service 'volar-service-sass-formatter' requires @volar/language-service version ~2.4.0.
Incompatible version of @volar/language-service installed.
fix
Run 'npm install @volar/language-service@2.4' to get the correct version.
Upgrade
Version history
0.0.71latest on npm
Audit
Dependencies
@volar/language-servicerequiredPeer dependency required to integrate with Volar's language service.
Agent activity
4 hits · last 30 days
node
4
Resources
volar-service-sass-formatter — npm install volar-service-sass-formatter · libregistry