
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
broccoli-stylelint
Advanced tools
Add stylelint to your broccoli build pipeline with ease.
npm install --save-dev broccoli-stylelint
var StyleLint = require('broccoli-stylelint');
// path to files that need linting
var node = new StyleLint('app/styles');
the default output will be the same SCSS files, in the same tree structure.
Tests are automatically generated
If tests are generated the plugin will output a tree of test files
original tree
.
├── scssfile1.sscss
└── nested-dir/
├── scssfile2.scss
output tree
.
├── scssfile1.stylelint-test.js
└── nested-dir/
├── scssfile2.stylelint-test.js
var StyleLint = require('broccoli-stylelint');
var Funnel = require('broccoli-funnel');
// path to files that need linting
var node = StyleLint.create('app/styles');
// to extract tests from linter output
new Funnel(node, {
srcDir:'tests',
});
** Disable test generation **
set the option disableTestGeneration:true
var node = new StyleLint('app/styles', {disableTestGeneration:true});
linterConfig
{Object}
Hash as specified by stylelint
doesn't accept files
option
All stylelint supported languages except jsx
are valid targets by default. Alternatively, a syntax
option can be passed in to scope targets to one language.
onError(errors)
{function}
A hook that allows you to do whatever you want, when an error occurs
array of errors
group
{boolean}
Groups tests under the same suite
testGenerator(relativePath, results, testingFramework)
{function}
A hook that allows you generate tests.
path of currently linted file
array of errors if null then no errors occured
testFailingFiles
{boolean}
If true it will generate a unit test if the file fails lint.
testPassingFiles
{boolean}
If true it will generate a unit test if the passes fails lint.
disableTestGeneration
{boolean}
Will disable generation of tests
testingFramework
{string}
supports 'qunit'
or 'mocha'
log
{boolean}
If true it will log results to console
console
{object}
A custom console object
FAQs
Broccoli stylelint plugin
We found that broccoli-stylelint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.