{"id":20532,"library":"sass-lint-webpack","title":"Sass Lint Webpack Plugin","description":"Webpack 4+ plugin that integrates sass-lint to lint SCSS/SASS files during the build process. Version 1.0.4 is the latest stable release. It delegates all linting to the sass-lint peer dependency and supports custom config files, glob patterns, and sass-lint options. Differentiators: lightweight wrapper specifically for Webpack 4+, not a loader but a Build plugin that runs linting on compilation. Requires Webpack 4+ and sass-lint ~1.12.1.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/swordray/sass-lint-webpack","tags":["javascript","lint","loader","sass","sass-lint","scss","scss-lint","webpack","webpack-plugin"],"install":[{"cmd":"npm install sass-lint-webpack","lang":"bash","label":"npm"},{"cmd":"yarn add sass-lint-webpack","lang":"bash","label":"yarn"},{"cmd":"pnpm add sass-lint-webpack","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; the actual linting engine","package":"sass-lint","optional":false}],"imports":[{"note":"CommonJS only; package does not provide ESM exports. Use require().","wrong":"import SassLintPlugin from 'sass-lint-webpack'","symbol":"SassLintPlugin","correct":"const SassLintPlugin = require('sass-lint-webpack')"}],"quickstart":{"code":"const SassLintPlugin = require('sass-lint-webpack');\n\nmodule.exports = {\n  // ...\n  plugins: [\n    new SassLintPlugin({\n      // Optional: custom config file path\n      configPath: '.sass-lint.yml',\n      // Optional: files glob pattern\n      files: 'src/**/*.scss',\n      // Optional: pass sass-lint options directly\n      options: {\n        rules: {\n          'no-important': 1,\n          'indentation': [1, {'size': 2}]\n        }\n      }\n    })\n  ]\n};","lang":"javascript","description":"Shows how to configure SassLintPlugin in webpack.config.js with optional settings."},"warnings":[{"fix":"npm install -D sass-lint sass-lint-webpack","message":"Requires sass-lint as peer dependency; install both.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use require('sass-lint-webpack') instead of import.","message":"Package uses CommonJS; cannot import with ESM syntax.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to Webpack 4+ or use alternative plugins.","message":"Only supports Webpack 4+; not compatible with Webpack 3 or lower.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Migrate to stylelint with stylelint-scss plugin.","message":"sass-lint is deprecated or unmaintained; consider using stylelint-scss instead.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Provide a .sass-lint.yml file or pass options to customize.","message":"No default configuration; will use sass-lint defaults if no config file or options provided.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install -D sass-lint sass-lint-webpack","cause":"Missing or incorrect installation.","error":"Cannot find module 'sass-lint-webpack'"},{"fix":"Use const SassLintPlugin = require('sass-lint-webpack')","cause":"Using import syntax with CommonJS module.","error":"Error: Module does not provide a default export"},{"fix":"npm install -D sass-lint","cause":"Missing sass-lint peer dependency.","error":"Error: Plugin could not be instantiated"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}