
Security News
New CNA Scorecard Tool Ranks CVE Data Quality Across the Ecosystem
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
sasslint-webpack-plugin
Advanced tools
NOTE Due to how non-js files are handled via webpack, this has been forked from sasslint-loader and rewritten as plugin instead of a loader.
Sasslint plugin for Webpack
$ npm install sasslint-webpack-plugin
In your webpack configuration
var sassLintPlugin = require('sasslint-webpack-plugin');
module.exports = {
// ...
plugins: [
new sassLintPlugin(),
],
// ...
}
You can customize the lint settings via a .sass-lint.yml
file. See sasslint options, for complete options.
configFile
: You can change the config file location. Default: (.sass-lint.yml
)context
: Array of strings or String, Change the root of your SCSS files. Default inherits from webpack config.ignoreFiles
: Array of files to ignore, must be full path, Default: noneignorePlugins
: Array of plugins to ignore, Default: none (example: extract-text-webpack-plugin
)glob
: Change the glob pattern for finding files. Default: (**/*.s?(a|c)ss
)quiet
: Suppress warnings, errors will still show. Default: false
failOnWarning
: Have Webpack's build process die on warning. Default: false
failOnError
: Have Webpack's build process die on error. Default: false
testing
: Quites output normally for testing purposes, Default: 'false' Caution do not use this unless you are catching errors via Webpack CLI!// Default settings
module.exports = {
plugins: [
new sassLintPlugin({
configFile: '.sass-lint.yml',
context: ['inherits from webpack'],
ignoreFiles: [],
ignorePlugins: [],
glob: '**/*.s?(a|c)ss',
quiet: false,
failOnWarning: false,
failOnError: false,
testing: false
}),
]
}
The plugin will dump full reporting of errors and warnings.
You can use the quiet
option to hide files which only have warnings.
quiet
will not hide errors, nor will it hide warnings on files with errors.
You will can duplicate output of errors and warnings if you use the extract-text-webpack-plugin, add it to the ignorePlugins
config option to prevent that.
NoErrorsPlugin
prevents Webpack from outputting anything into a bundle. So even sass-lint warnings
will fail the build. No matter what error settings are used for sasslint-webpack-plugin
.
So if you want to see sass-lint warnings in console during development using WebpackDevServer
remove NoErrorsPlugin
from webpack config.
FAQs
sass-lint plugin for webpack
We found that sasslint-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.