Registry / devops / sasslint-webpack-plugin

sasslint-webpack-plugin

JSON →
library1.0.4jsnpmunverified

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.

npm install sasslint-webpack-plugin
INSTALL
IMPORT
SIG · SASSLINT-WEBPACK-P
S
sasslint-webpack-plugin
devopsjavascriptv1.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

default
const sassLintPlugin = require('sasslint-webpack-plugin');
import sassLintPlugin from 'sasslint-webpack-plugin';
Package is CommonJS-only; ES module import is unsupported in Node.js.
new sassLintPlugin
plugins: [new sassLintPlugin({ /* options */ })]
plugins: [sassLintPlugin({ /* options */ })]
Requires 'new' keyword; it's a constructor, not a factory function.
options.glob
glob: '**/*.s?(a|c)ss'
glob: '**/*.scss'
Default glob matches .sass, .scss, and .css files; changing to only .scss will skip .sass and .css files.

Shows how to configure sasslint-webpack-plugin with typical options: config file, context, ignore patterns, and fail-on-error.

const sassLintPlugin = require('sasslint-webpack-plugin'); module.exports = { // ... other webpack config plugins: [ new sassLintPlugin({ configFile: '.sass-lint.yml', context: ['src/styles'], ignoreFiles: ['src/styles/vendor/**'], glob: '**/*.s?(a|c)ss', quiet: false, failOnWarning: false, failOnError: true }) ] };
Debug
Known issues
deprecatedsass-lint is deprecated in favor of stylelint. This plugin relies on sass-lint and will not receive updates.
fix
Migrate to stylelint with webpack stylelint-webpack-plugin.
affects: >=1.0.0
breakingRequires Node.js 4+ and webpack 1.x/2.x; incompatible with webpack 5 and Node.js >=17.
fix
Use a modern linting plugin compatible with your webpack and Node versions.
affects: >=1.0.0
gotchaUsing with extract-text-webpack-plugin causes duplicate lint output unless you add it to ignorePlugins.
fix
Add 'extract-text-webpack-plugin' to ignorePlugins array in options.
affects: >=1.0.0
gotchaNoErrorsPlugin in webpack config will fail the build on any lint warning, regardless of failOnWarning setting.
fix
Remove NoErrorsPlugin from webpack configuration or set failOnWarning to false.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'sass-lint'
sass-lint is a peer dependency and is not installed automatically.
fix
Run 'npm install sass-lint@^1.8.0' to install the peer dependency.
sassLintPlugin is not a constructor
Using import statement or calling the function without 'new'.
fix
Use 'const sassLintPlugin = require('sasslint-webpack-plugin');' and instantiate with 'new sassLintPlugin(options)'.
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
Using the plugin with webpack 5, which changed plugin API requirements.
fix
Upgrade to a webpack 5 compatible lint plugin (e.g., stylelint-webpack-plugin).
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies
sass-lintrequiredRuntime peer dependency for linting logic
Agent activity
4 hits · last 30 days
node
4
Resources
sasslint-webpack-plugin — npm install sasslint-webpack-plugin · libregistry