![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
stylelint-config-kyt
Advanced tools
This is an extension of config-standard with some overrides for CSS/Sass Modules.
Note, installing kyt
or setting up a starter-kyt will install this package automatically. If you want to install this linter extension separately, follow these install instructions. If you have kyt
installed and you want to override the linter configuration, skip to step (2).
npm install stylelint stylelint-config-kyt stylelint-config-standard --save-dev
{
"extends": "stylelint-config-nyt",
"rules": {
/* If you must, override rules here :P */
}
}
The following guide is best used with the kyt linter against CSS/Sass Modules.
{
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
).
Master
1.0.0-alpha.2 - 10/20/17
1.0.0-alpha.1 - 10/20/17
0.3.2 - 04/10/17
Removes at-rule-no-unknown
so all sass syntax is supported.
0.3.1 - 03/28/17
This release ensures using CSS modules selectors such as :global and :local don't trigger invalid stylelint errors. Useful when using libraries such as react-addons-css-transition-group.
0.3.0 - 03/23/17
This release upgrades Stylelint from 7.5.0 to 7.9.0 and stylelint-config-standard from 14.0.0 to 16.0.0.
0.2.0 - 02/07/17
dependencies
were converted to peerDependencies
and kyt
now includes the dependencies. If you're using kyt
, then an npm install
should be enough. If you installed this package as a standalone extension then you'll need to follow the Installation instructions and npm install
the named dependencies.
**0.0.1 - 0.1.0 ** - 12/08/16 - life
FAQs
StyleLint configuration for kyt projects.
The npm package stylelint-config-kyt receives a total of 251 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.