Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
broccoli-sass-lint
Advanced tools
This is a pure Node.js SASS linter for Broccoli-based applications and plugins.
npm install --save-dev broccoli-sass-lint
var SassLinter = require('broccoli-sass-lint');
var node = new SassLinter('app/styles'); // Or wherever the files are
Options can be passed as a second argument to SassLinter()
.
The defaults are shown below;
var SassLinter = require('broccoli-sass-lint', {
configPath: 'sass-lint.yml',
shouldThrowExceptions: true,
shouldLog: true,
});
Type | String |
---|---|
Default | 'sass-lint.yml' |
A name of the file your config is contained in. This should be a .yml
file, preferrably in the root of the Broccoli project.
Type | Boolean |
---|---|
Default | true |
By default, sass-lint
throws exceptions when an error is encountered (note, warnings do not throw errors). Usually this is the preffered functionality.
However, you can stop errors being thrown and, therefore, errors stopping the build process by setting shouldThrowExceptions: false
. Use with caution!
Type | Boolean |
---|---|
Default | true |
Whether to log warnings and errors to the console. When this is set to false
you will not be notified or linting errors!
Type | Function |
---|---|
Param | fileLint (Object) |
You may override this plugin's default logError()
function should you need to intercept file lint objects (e.g. when testing this plugin).
var SassLinter = require('broccoli-sass-lint', {
logError: function(fileLint) {
assert.equal(fileLint.errors.length, 0,
'Should have no errors detected');
}
});
fileLint
is passed in the format returned by sass-lint
's lintText()
method
When you override logError()
this plugin won't log any warnings or errors.
All tests are currently contained in tests/test.js
. Tests can be ran with:
npm test
PRs are welcomed and should be issued to the master
branch.
FAQs
Pure Node.js scss/sass linting for Broccoli-based projects
The npm package broccoli-sass-lint receives a total of 409 weekly downloads. As such, broccoli-sass-lint popularity was classified as not popular.
We found that broccoli-sass-lint 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.