Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
stylelint-config-recommended-scss
Advanced tools
The stylelint-config-recommended-scss package is a Stylelint configuration that provides a set of recommended rules for SCSS (Sass) files. It helps enforce consistent coding styles and best practices in SCSS, ensuring that your stylesheets are clean, maintainable, and free of common errors.
Basic SCSS Linting
This feature ensures that your SCSS files adhere to a set of recommended rules, catching common errors and enforcing best practices. For example, it can catch issues like missing semicolons, incorrect nesting, and more.
/* Example SCSS file */
$primary-color: #333;
body {
color: $primary-color;
font-size: 16px;
}
Variable Naming Conventions
This feature enforces consistent naming conventions for variables, ensuring that they are named in a way that is easy to understand and maintain. For example, it can enforce the use of hyphens or underscores in variable names.
/* Example SCSS file */
$primary-color: #333;
$secondary-color: #666;
body {
color: $primary-color;
}
Nesting Rules
This feature enforces best practices for nesting rules in SCSS, ensuring that your stylesheets are organized and easy to read. For example, it can enforce a maximum depth for nested rules to prevent overly complex stylesheets.
/* Example SCSS file */
nav {
ul {
margin: 0;
padding: 0;
list-style: none;
}
li { display: inline-block; }
a {
display: block;
padding: 6px 12px;
text-decoration: none;
}
}
The stylelint-config-standard package provides a standard set of rules for CSS and SCSS linting. It is similar to stylelint-config-recommended-scss but is more general, covering both CSS and SCSS. It is a good choice if you need a broader set of linting rules.
The stylelint-config-sass-guidelines package is based on the Sass Guidelines by Hugo Giraudel. It provides a comprehensive set of rules specifically for SCSS, making it a good alternative to stylelint-config-recommended-scss if you are looking for a more opinionated set of rules.
The stylelint-config-recommended package provides a minimal set of rules for CSS linting. It is less comprehensive than stylelint-config-recommended-scss but can be a good starting point if you want to build your own custom configuration.
The recommended shareable SCSS config for stylelint.
It turns on all the possible errors rules within stylelint.
Use it as is or as a foundation for your own config.
First, install stylelint-scss and stylelint, if you haven't done so yet via NPM:
npm install stylelint stylelint-scss --save-dev
and then you can install the config:
npm install stylelint-config-recommended-scss --save-dev
If you've installed stylelint-config-recommended-scss
locally within your project, just set your stylelint
config to:
{
"extends": "stylelint-config-recommended-scss"
}
If you've globally installed stylelint-config-recommended-scss
using the -g
flag, then you'll need to use the absolute path to stylelint-config-recommended-scss
in your config e.g.
{
"extends": "/absolute/path/to/stylelint-config-recommended-scss"
}
Simply add a "rules"
key to your config, then add your overrides and additions there.
For example, to turn off the block-no-empty
rule, and add the unit-whitelist
rule:
{
"extends": "stylelint-config-recommended-scss",
"rules": {
"block-no-empty": null,
"unit-whitelist": ["em", "rem", "s"]
}
}
3.0.0
stylelint-config-recommended
dependency to version 2.0.0.stylelint
peer dependency to version 8.3.0.FAQs
The recommended shareable SCSS config for Stylelint
The npm package stylelint-config-recommended-scss receives a total of 1,664,837 weekly downloads. As such, stylelint-config-recommended-scss popularity was classified as popular.
We found that stylelint-config-recommended-scss demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.