Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
stylelint-config-kyt
Advanced tools
This is an extension of stylelint-config-standard with some overrides for CSS/Sass Modules.
If you want to install this linter extension, follow these install instructions.
$ yarn add --dev stylelint stylelint-config-standard stylelint-config-kyt
// or
$ npm i --save-dev --save-exact stylelint stylelint-config-standard stylelint-config-kyt
Add a .stylelintrc
file to your project's root with these contents:
{
"extends": "stylelint-config-nyt",
"rules": {}
}
{
in rule declarations.:
character.}
of rule declarations on a new lineBad
.avatar {
border-radius: 50%;
border: 2px solid white;
}
.no,
.nope,
.not_good {
// ...
}
#lol-no {
// ...
}
Good
.avatar {
border-radius: 50%;
border: 2px solid white;
}
.one,
.selector,
.perLine {
// ...
}
//
in Sass-land) to block comments.While it is possible to select elements by ID in CSS, it should generally be considered an anti-pattern. ID selectors introduce an unnecessarily high level of specificity to your rule declarations, and they are not reusable.
You should never define an ID selector in a CSS Module.
.scss
syntax, never the original .sass
syntax@include
declarations logically (see below)@include
or composes
declarations
Property declarations in alphabetical order
.btnGreen {
@include transition(background 0.5s ease);
background: green;
color: red;
font-weight: bold;
// ...
}
Nested pseudo-selectors
Nested pseudo-selectors go last, and nothing goes after them.
.btn {
@include color(red);
font-weight: bold;
&:hover {
cursor: pointer;
}
}
Prefer camelCased variable names (e.g. $myVariable
).
FAQs
StyleLint configuration for kyt projects.
The npm package stylelint-config-kyt receives a total of 20 weekly downloads. As such, stylelint-config-kyt popularity was classified as not popular.
We found that stylelint-config-kyt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.