{"id":20535,"library":"sasslint-webpack-plugin","title":"sasslint-webpack-plugin","description":"Webpack plugin for running sass-lint on SCSS/SASS files during build. Version 1.0.4 is the latest and last release; the package depends on sass-lint ^1.8.0, which is itself deprecated in favor of stylelint. The plugin lints files based on a glob pattern and reports errors/warnings via webpack. Unlike loaders, this plugin works with non-JS files and supports integration with extract-text-webpack-plugin. It offers options for config file, context, ignore patterns, and fail-on-warning/error. No longer actively maintained; users should migrate to sass-lint alternatives.","status":"deprecated","version":"1.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/alleyinteractive/sasslint-webpack-plugin","tags":["javascript","sass-lint","lint","linter","node-sass","webpack","plugin","webpack-plugin"],"install":[{"cmd":"npm install sasslint-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add sasslint-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add sasslint-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime peer dependency for linting logic","package":"sass-lint","optional":false}],"imports":[{"note":"Package is CommonJS-only; ES module import is unsupported in Node.js.","wrong":"import sassLintPlugin from 'sasslint-webpack-plugin';","symbol":"default","correct":"const sassLintPlugin = require('sasslint-webpack-plugin');"},{"note":"Requires 'new' keyword; it's a constructor, not a factory function.","wrong":"plugins: [sassLintPlugin({ /* options */ })]","symbol":"new sassLintPlugin","correct":"plugins: [new sassLintPlugin({ /* options */ })]"},{"note":"Default glob matches .sass, .scss, and .css files; changing to only .scss will skip .sass and .css files.","wrong":"glob: '**/*.scss'","symbol":"options.glob","correct":"glob: '**/*.s?(a|c)ss'"}],"quickstart":{"code":"const sassLintPlugin = require('sasslint-webpack-plugin');\n\nmodule.exports = {\n  // ... other webpack config\n  plugins: [\n    new sassLintPlugin({\n      configFile: '.sass-lint.yml',\n      context: ['src/styles'],\n      ignoreFiles: ['src/styles/vendor/**'],\n      glob: '**/*.s?(a|c)ss',\n      quiet: false,\n      failOnWarning: false,\n      failOnError: true\n    })\n  ]\n};","lang":"javascript","description":"Shows how to configure sasslint-webpack-plugin with typical options: config file, context, ignore patterns, and fail-on-error."},"warnings":[{"fix":"Migrate to stylelint with webpack stylelint-webpack-plugin.","message":"sass-lint is deprecated in favor of stylelint. This plugin relies on sass-lint and will not receive updates.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use a modern linting plugin compatible with your webpack and Node versions.","message":"Requires Node.js 4+ and webpack 1.x/2.x; incompatible with webpack 5 and Node.js >=17.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Add 'extract-text-webpack-plugin' to ignorePlugins array in options.","message":"Using with extract-text-webpack-plugin causes duplicate lint output unless you add it to ignorePlugins.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Remove NoErrorsPlugin from webpack configuration or set failOnWarning to false.","message":"NoErrorsPlugin in webpack config will fail the build on any lint warning, regardless of failOnWarning setting.","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":"Run 'npm install sass-lint@^1.8.0' to install the peer dependency.","cause":"sass-lint is a peer dependency and is not installed automatically.","error":"Error: Cannot find module 'sass-lint'"},{"fix":"Use 'const sassLintPlugin = require('sasslint-webpack-plugin');' and instantiate with 'new sassLintPlugin(options)'.","cause":"Using import statement or calling the function without 'new'.","error":"sassLintPlugin is not a constructor"},{"fix":"Upgrade to a webpack 5 compatible lint plugin (e.g., stylelint-webpack-plugin).","cause":"Using the plugin with webpack 5, which changed plugin API requirements.","error":"WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}