Skip to content

Conversation

@meritt
Copy link
Member

@meritt meritt commented Jan 23, 2026

Major update of Stylelint config aligned with htmlacademy/codeguide#75.

Dependencies

Package Before After
@stylistic/stylelint-plugin 4.0.0 ^5.0.1
postcss-less 6.0.0 ^6.0.0
postcss-scss 4.0.9 ^4.0.9
stylelint (peer) ^16.25.0 ^16.25.0 || ^17.0.0
stylelint (dev) 16.25.0 ^17.0.0
stylelint-order ^7.0.1
@htmlacademy/editorconfig-cli 3.0.0 removed
husky 9.1.7 removed

Stylelint Rules

New

  • order/properties-order — enforces property ordering in 7 groups:

    1. custom-properties — CSS custom properties (--*)
    2. positioningposition, inset, top, right, bottom, left, z-index
    3. box-modeldisplay, flexbox, grid, dimensions, margins, paddings, overflow
    4. typographyfont-*, line-height, text-*, color
    5. decorationbackground-*, border-*, outline-*, box-shadow, opacity
    6. animationtransition-*, animation-*
    7. interactivitycursor, pointer-events, user-select, scroll-*
  • keyframes-name-pattern — requires kebab-case for @keyframes names
    (^[a-z][a-z0-9]*(-[a-z0-9]+)*$)

  • at-rule-disallowed-list: ["import"] — disallows @import in CSS (disabled for
    Less/SCSS)

Modified

Rule Before After
declaration-no-important error warning
color-function-notation null "modern"

color-function-notation: "modern" requires rgb() / hsl() syntax instead of rgba()
/ hsla()

@meritt meritt self-assigned this Jan 23, 2026
@meritt
Copy link
Member Author

meritt commented Jan 23, 2026

@nikolai-shabalin вот вам ещё один

"description": "Stylelint shareable config for the HTML Academy style",
"version": "4.4.0",
"type": "module",
"version": "5.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Версию вроде бы не стоит руками править. Она автоматически поднимается при запуске публикации.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Кстати, (минутка рекламы) рекомендую мою релизилку @firefoxic/release-it — полная автоматизация, нужно лишь ченджлог правильно подготовить, экшен добавить и в нужную ветку запушить (release*). Можно и без экшена локально запускать, но придётся OTP вводить.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, я как деды умею ;) не страшно

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тоже умею, но задолбался каждый раз вспоминать весь порядок, и всё равно либо команду какую, либо флаг какой-то пропускать. Да ещё и релиз на гитхабе вручную стряпать.
Страдать должны машины — вот я и сделал скрипт, делающий всё и правильно.

А сегодня ещё и от pnpm отвязал его, на случай, если вдруг будет желание сюда внедрить =)

Copy link
Contributor

@firefoxic firefoxic Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Но версию в package.json в любом случае надо ревертнуть, а то npm version поднимет до 6.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants