Registry / testing / sasslint-loader

sasslint-loader

JSON →
library0.0.1jsnpmunverified

A Webpack loader that integrates sass-lint into the build pipeline, version 0.0.1. It allows linting SCSS/SASS files as part of the Webpack compilation, either as a pre-loader or loader. The loader supports custom configuration files, emit options for errors/warnings, quiet mode, and fail-on-error/warning settings. It is under development and lacks line number reporting. Compared to alternatives like sass-lint-plugin, it is simpler but has limited features and maintenance status.

npm install sasslint-loader
INSTALL
IMPORT
SIG · SASSLINT-LOADER
S
sasslint-loader
testingjavascriptv0.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Webpack configuration to lint SCSS files using sasslint-loader before compilation.

// webpack.config.js module.exports = { // ... module: { preLoaders: [ { test: /\.scss$/, exclude: /node_modules/, loader: 'sasslint' } ], loaders: [ { test: /\.scss$/, exclude: /node_modules/, loader: 'style!css!sass' } ] }, sasslint: { configFile: '.sass-lint.yml' } };
Debug
Known issues
breakingUnder development: line numbers for errors and warnings are not provided.
fix
Consider using alternative linters or wait for updates.
affects: 0.0.1
gotchaExtractTextPlugin runs loaders a second time, causing duplicate lint output.
fix
Set stats: { children: false } in Webpack config.
affects: >=0.0.0
gotchaNoErrorsPlugin causes warnings to fail the build regardless of sasslint-loader settings.
fix
Remove NoErrorsPlugin during development or adjust Webpack config.
affects: >=0.0.0
deprecatedsass-lint is deprecated; consider using stylelint or sass-lint alternatives.
fix
Migrate to stylelint with sass/scss support.
affects: >=0.0.0
Errors
Common errors & fixes
Module build failed: TypeError: Cannot read property 'line' of undefined
sass-lint reported an error without line numbers, and loader tries to parse line.
fix
Ensure sass-lint rules produce line numbers (update sass-lint version).
Duplicate lint output when using ExtractTextPlugin
ExtractTextPlugin runs loaders twice.
fix
Add stats: { children: false } to Webpack config.
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies
sass-lintrequiredsass-lint is the underlying linter; this loader is a wrapper for Webpack.
Agent activity
4 hits · last 30 days
node
4
Resources
sasslint-loader — npm install sasslint-loader · libregistry