Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@18f/stylelint-rules
Advanced tools
A style (CSS, Sass) linter for the 18F style guide
The aim of this module is to present a sensible set of linting defaults for front-end projects, without requiring an additional dependency on ruby. It leverages stylelint and postCSS to perform many of the same linting functions as scss-lint.
To get started, run npm install --save-dev @18f/stylelint-rules
. This adds the module
to your project and saves the dependency to your package.json.
stylelint-rules provides two ways to run its linter: via the command line, and via gulp.
To run the linter using gulp, import the module into your gulpfile:
var stylelint = require('@18f/stylelint-rules');
The stylelint function accepts two arguments:
files
: required A glob of files you want to lint. For example './src/scss/**/*.scss'
options
: optional An object of configuration options.
{
syntax: Syntax the linter validates against. Valid options are `scss|css|less`. Defaults to scss
ignore: A glob (or array of globs) of files the linter should ignore,
config: A path to a stylelint config file. File should use the same
conventions as the config file found in this repository, exporting a
single javascript object.
}
Example gulp task:
var lintFunction = stylelint('./src/css/**/*.scss', {
ignore: 'some/lib/**/*.scss'
});
gulp.task('my-lint-task', lintFunction);
The linter can also be run using the command line. The script is installed in the .bin folder of your node_modules directory. The only required argument to the script is a glob of directories (or path to a single file) to be linted.
For example: node_modules/.bin/18f-stylelint-rules "./path/to/sass/**/*.scss"
Additionally, the CLI exposes the following options:
-s, --syntax [scss|css|less], Linter syntax. Defaults to scss.
-i, --ignore-files [string], Glob of directories or files to ignore
-f, --formatter [verbose|json|string], Output formatter. Defaults to verbose.
-c, --config [rules], Path to a js file that exports an object describing additional rules.
Please see CONTRIBUTING.md.
FAQs
A style (CSS, Sass) linter for the 18F style guide
We found that @18f/stylelint-rules demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.