Registry / testing / sass-lint-vue

sass-lint-vue

JSON →
library0.4.0jsnpmunverified

Command line tool to lint Sass/SCSS styles inside Vue single file components by extracting <style> blocks and feeding them to sass-lint. Version 0.4.0 is the latest stable release (last updated 2017). No longer actively maintained; users should migrate to stylelint with stylelint-scss and Vue-specific plugins. Key differentiator: leverages the legacy sass-lint engine, which is deprecated in favor of stylelint.

npm install sass-lint-vue
INSTALL
IMPORT
SIG · SASS-LINT-VUE
S
sass-lint-vue
testingjavascriptv0.4.0
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.

default
const sassLintVue = require('sass-lint-vue');
import sassLintVue from 'sass-lint-vue';
This package does not export ESM; only CommonJS require works.
lintFiles
const { lintFiles } = require('sass-lint-vue');
import { lintFiles } from 'sass-lint-vue';
Entry point for programmatic usage; still CommonJS-only.
CLI
const { CLI } = require('sass-lint-vue');
Access to CLI runner if needed; commonly used via command line only.

Shows CLI usage and programmatic API for linting Sass in Vue components.

// Install: npm install sass-lint-vue // Create .sass-lint.yml (sass-lint config) // Run CLI on a .vue file: // npx sass-lint-vue components/MyComponent.vue // Programmatic usage: const { lintFiles } = require('sass-lint-vue'); const results = lintFiles('src/**/*.vue'); console.log(results);
sass-lint-vue --version
Debug
Known issues
deprecatedPackage is unmaintained since 2017; sass-lint itself is deprecated.
fix
Migrate to stylelint + stylelint-scss and @stylelint/vue-syntax.
affects: >=0.0.0
breakingRequires Node.js <12; newer Node versions may fail to install due to native module dependencies of sass-lint.
fix
Use Node 10 or lower, or switch to a modern linter like stylelint.
affects: >=0.4.0
gotchaOnly lints <style lang="scss"> or <style lang="sass"> blocks; plain <style> (CSS) is ignored.
fix
Ensure your Vue components use lang="scss" or lang="sass". For plain CSS, use stylelint directly.
affects: >=0.0.0
gotchaDoes not support Vue single file components with multiple <style> blocks; only first one is linted.
fix
Combine all styles into one <style> block per component, or use stylelint.
affects: >=0.0.0
deprecatedsass-lint configuration (.sass-lint.yml) is different from stylelint; no migration path provided.
fix
Rewrite rules using stylelint-scss conventions.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'sass-lint'
Missing peer dependency; sass-lint-vue does not install it automatically.
fix
Run 'npm install sass-lint' alongside sass-lint-vue.
Error: No configuration found. Please create a .sass-lint.yml file.
sass-lint requires an explicit config file even for defaults.
fix
Create .sass-lint.yml in project root with at least 'options: {}'.
SyntaxError: Unexpected token import (while requiring sass-lint-vue)
Trying to use ESM import on a CommonJS-only module.
fix
Replace 'import ...' with 'const ... = require(...)'.
Error: ENOENT: no such file or directory, scandir 'node_modules/node-sass'
sass-lint depends on node-sass which requires native compilation; may fail on newer Node.
fix
Use Node.js 10 or 8, or switch to stylelint.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
sass-lintrequiredcore linting engine; sass-lint-vue wraps it to handle .vue files
vue-template-compilerrequiredparses Vue single file components to extract style blocks
Agent activity
3 hits · last 30 days
node
2
Resources
sass-lint-vue — npm install sass-lint-vue · libregistry