{"id":26363,"library":"sass-lint-vue","title":"sass-lint-vue","description":"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.","status":"maintenance","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/sourceboat/sass-lint-vue","tags":["javascript","lint","linting","linter","sass","scss","vue"],"install":[{"cmd":"npm install sass-lint-vue","lang":"bash","label":"npm"},{"cmd":"yarn add sass-lint-vue","lang":"bash","label":"yarn"},{"cmd":"pnpm add sass-lint-vue","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core linting engine; sass-lint-vue wraps it to handle .vue files","package":"sass-lint","optional":false},{"reason":"parses Vue single file components to extract style blocks","package":"vue-template-compiler","optional":false}],"imports":[{"note":"This package does not export ESM; only CommonJS require works.","wrong":"import sassLintVue from 'sass-lint-vue';","symbol":"default","correct":"const sassLintVue = require('sass-lint-vue');"},{"note":"Entry point for programmatic usage; still CommonJS-only.","wrong":"import { lintFiles } from 'sass-lint-vue';","symbol":"lintFiles","correct":"const { lintFiles } = require('sass-lint-vue');"},{"note":"Access to CLI runner if needed; commonly used via command line only.","wrong":null,"symbol":"CLI","correct":"const { CLI } = require('sass-lint-vue');"}],"quickstart":{"code":"// Install: npm install sass-lint-vue\n// Create .sass-lint.yml (sass-lint config)\n// Run CLI on a .vue file:\n// npx sass-lint-vue components/MyComponent.vue\n\n// Programmatic usage:\nconst { lintFiles } = require('sass-lint-vue');\nconst results = lintFiles('src/**/*.vue');\nconsole.log(results);","lang":"javascript","description":"Shows CLI usage and programmatic API for linting Sass in Vue components."},"warnings":[{"fix":"Migrate to stylelint + stylelint-scss and @stylelint/vue-syntax.","message":"Package is unmaintained since 2017; sass-lint itself is deprecated.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use Node 10 or lower, or switch to a modern linter like stylelint.","message":"Requires Node.js <12; newer Node versions may fail to install due to native module dependencies of sass-lint.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Ensure your Vue components use lang=\"scss\" or lang=\"sass\". For plain CSS, use stylelint directly.","message":"Only lints <style lang=\"scss\"> or <style lang=\"sass\"> blocks; plain <style> (CSS) is ignored.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Combine all styles into one <style> block per component, or use stylelint.","message":"Does not support Vue single file components with multiple <style> blocks; only first one is linted.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Rewrite rules using stylelint-scss conventions.","message":"sass-lint configuration (.sass-lint.yml) is different from stylelint; no migration path provided.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install sass-lint' alongside sass-lint-vue.","cause":"Missing peer dependency; sass-lint-vue does not install it automatically.","error":"Error: Cannot find module 'sass-lint'"},{"fix":"Create .sass-lint.yml in project root with at least 'options: {}'.","cause":"sass-lint requires an explicit config file even for defaults.","error":"Error: No configuration found. Please create a .sass-lint.yml file."},{"fix":"Replace 'import ...' with 'const ... = require(...)'.","cause":"Trying to use ESM import on a CommonJS-only module.","error":"SyntaxError: Unexpected token import (while requiring sass-lint-vue)"},{"fix":"Use Node.js 10 or 8, or switch to stylelint.","cause":"sass-lint depends on node-sass which requires native compilation; may fail on newer Node.","error":"Error: ENOENT: no such file or directory, scandir 'node_modules/node-sass'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}