npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@e_fellow/stylelint-base-config

v1.0.0

Published

Базовый набор для конфигурации Stylelint

Readme

stylelint-base-config


Данный пакет объединяет популярные пресеты Stylelint с набором кастомных правил, ориентированных на крупные SCSS-кодовые базы: контроль сложности, запрет неявных зависимостей и принудительное использование дизайн-токенов.


Установка

NPM:

npm install --save-dev stylelint @e_fellow/stylelint-base-config

YARN:

yarn add -D stylelint @e_fellow/stylelint-base-config

После установки в .stylelintrc.js:

module.exports = { extends: ['@e_fellow/stylelint-base-config'], };

| Категория | Элемент | Назначение | |-----------|---------|------------| | Presets (extends) | stylelint-config-standard | Базовые форматные и лучшие практики от команды Stylelint. | | | stylelint-config-idiomatic-order | Жёсткий порядок свойств по методологии Idiomatic CSS (stylelint-order). | | Plugins (plugins) | stylelint-scss | SCSS-специфичный синтаксис и правила (scss/at-rule-no-unknown). | | | stylelint-high-performance-animation | Предупреждает о затратных свойствах в @keyframes / transition. | | | custom plugins | Собственные правила — см. таблицу ниже. |


Кастомные правила

| Имя правила | Значение по-умолчанию | Что проверяет | |-------------|-----------------------|---------------| | basic-rules/max-nesting-depth | 3 | Глубина вложенности селекторов. | | basic-rules/no-hardcoded-colors | true | Запрещает прямые HEX / RGB / hsl-значения и цвет-keywords, если они не внутри var(--token) или $variable. | | basic-rules/no-literal-z-index | true | Запрещает числовые z-index; допускает токены, auto, calc(). | | basic-rules/no-extend | true | Запрет @extend; используем миксины / утилити-классы. | | basic-rules/max-control-nesting | 1 | Контроль @if / @for / @each / @while – не глубже 1 уровня. |


Дополнительные настройки правил

| Правило | Настройка | Причина | |---------|-----------|---------| | color-hex-length | "long" | 6-значный HEX для читаемости (#ffffff). | | at-rule-no-unknown | null | Отключено в пользу scss/at-rule-no-unknown. | | scss/at-rule-no-unknown | true | Ловит опечатки в SCSS-директивах. | | selector-pseudo-class-no-unknown | true + ignorePseudoClasses: ['global'] | Разрешаем :global из CSS-Modules. | | unit-no-unknown | null | Допускаем проектные единицы (rpx и т. д.). | | plugin/no-low-performance-animation-properties | true + ignore paint-props | Запрет анимации свойств, вызывающих layout. | | selector-type-no-unknown | true + ignore: ['custom-elements', 'default-namespace'] | Разрешаем Web-Components и namespaced SVG. | | selector-type-case | 'lower' + ignore regex | Тип-селекторы в нижнем регистре. | | property-no-unknown | null | Разрешаем экспериментальные свойства. |


basic-rules/max-nesting-depth

Пример использования:

/* ✅ depth 2 — OK */
.nav {
  .item { color: red; }
}

/* ❌ depth 4 — ошибка */
.a { .b { .c { .d { } } } }

basic-rules/no-hardcoded-colors

Пример использования:

/* ✅ допускается токен */
.card {
  border-color: var(--border-color);
}

$text-color: #222;

/* ✅ допускается токен */
.title {
  color: $text-color;
}

/* ❌ жёсткий HEX */
.title2 {
  color: red;
}

basic-rules/no-literal-z-index

Пример использования:

/* ✅ переменная */
.modal { z-index: $z-modal; }

/* ❌ число */
.dropdown { z-index: 9999; }

basic-rules/no-extend

Пример использования:

/* ✅ миксин */
@include button-base;

/* ❌ @extend */
.btn-danger { @extend .btn; }

basic-rules/max-control-nesting

Пример использования:

/* ✅ depth 1 */
@each $c in red {
  @if $c == red { color: red; }
}

/* ❌ depth 2 */
@for $i from 1 through 3 {
  @if $i > 1 {
    @each $c in red { }
  }
}

Лицензия MIT