Registry / devops / sass-lint-webpack

sass-lint-webpack

JSON →
library1.0.4jsnpmunverified

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.

npm install sass-lint-webpack
INSTALL
IMPORT
SIG · SASS-LINT-WEBPACK
S
sass-lint-webpack
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.

SassLintPlugin
const SassLintPlugin = require('sass-lint-webpack')
import SassLintPlugin from 'sass-lint-webpack'
CommonJS only; package does not provide ESM exports. Use require().

Shows how to configure SassLintPlugin in webpack.config.js with optional settings.

const SassLintPlugin = require('sass-lint-webpack'); module.exports = { // ... plugins: [ new SassLintPlugin({ // Optional: custom config file path configPath: '.sass-lint.yml', // Optional: files glob pattern files: 'src/**/*.scss', // Optional: pass sass-lint options directly options: { rules: { 'no-important': 1, 'indentation': [1, {'size': 2}] } } }) ] };
Debug
Known issues
gotchaRequires sass-lint as peer dependency; install both.
fix
npm install -D sass-lint sass-lint-webpack
affects: >=1.0.0
gotchaPackage uses CommonJS; cannot import with ESM syntax.
fix
Use require('sass-lint-webpack') instead of import.
affects: >=1.0.0
gotchaOnly supports Webpack 4+; not compatible with Webpack 3 or lower.
fix
Upgrade to Webpack 4+ or use alternative plugins.
affects: >=1.0.0
deprecatedsass-lint is deprecated or unmaintained; consider using stylelint-scss instead.
fix
Migrate to stylelint with stylelint-scss plugin.
affects: >=1.0.0
gotchaNo default configuration; will use sass-lint defaults if no config file or options provided.
fix
Provide a .sass-lint.yml file or pass options to customize.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'sass-lint-webpack'
Missing or incorrect installation.
fix
npm install -D sass-lint sass-lint-webpack
Error: Module does not provide a default export
Using import syntax with CommonJS module.
fix
Use const SassLintPlugin = require('sass-lint-webpack')
Error: Plugin could not be instantiated
Missing sass-lint peer dependency.
fix
npm install -D sass-lint
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies
sass-lintrequiredPeer dependency; the actual linting engine
Agent activity
4 hits · last 30 days
node
4
Resources
sass-lint-webpack — npm install sass-lint-webpack · libregistry