@cuzom/stylelint-config

Stylelint settings: the standard rules, Vue single-file components, and values that come from design tokens.
367
Install
npm install @cuzom/stylelint-config
Latest Version:1.2.0
License:Apache-2.0
Last Updated:Oct 23, 2026
Links: GitHub  ·  npm
Maintainer: harrikauhanen

@cuzom/stylelint-config

Cuzom Oy's Stylelint config: the standard rules, Vue single-file components, and values that come from design tokens instead of being written into a component.

pnpm add -D stylelint @cuzom/stylelint-config

stylelint.config.js:

import cuzom from '@cuzom/stylelint-config'

export default {
  ...cuzom,
  // project rules; ignoreFiles: ['**/dist/**', '.nuxt/**', '.output/**']
}

Run it on CSS and Vue files: stylelint "**/*.{css,vue}".

What it adds to stylelint-config-standard and stylelint-config-recommended-vue

  • Tokens, not literals. color, background-color, border-color, font-size, border-radius, z-index, gap, margin* and padding* take var(--…) (or a function such as calc() or clamp()), not 13px or #cc0000. Allowed as they are: 0, auto, inherit, currentColor, transparent, percentages, an em that follows the text around it, and a nudge under 4px (and a hairline under 0.25rem). A shadow's offsets and blur are geometry and stay literal; its colour is a token, because hex and rgb() are refused.

  • No hex colours and no rgb(), hsl() or similar in a component. color-mix() is fine. A token file (tokens.css) defines the colours; turn the rule off for it:

    overrides: [
      {
        files: ['**/tokens.css'],
        rules: {
          'color-no-hex': null,
          'function-disallowed-list': null,
          'scale-unlimited/declaration-strict-value': null,
        },
      },
    ],
    
  • No !important, no id selectors, and media queries in range syntax (width <= 640px).

  • Kebab-case class names, the standard rule unchanged (Radix Themes and aura-aq-sim name theirs that way). A repository that already has BEM names (block__element--modifier) can allow them with its own selector-class-pattern. no-descending-specificity is off, because it fights with scoped component styles.

Formatting is left to Prettier. pnpm test in this repository checks what the config accepts and refuses.

Related Packages

@tresinternet/stylelint-config-vue3

Default settings for Stylelint for a Vue3 project

2,158
@taknepoidet-config/stylelint

Конфигурация Stylelint

894 0
@maz-ui/stylelint-config

Stylelint configuration for CSS, SCSS, Vue and Tailwind CSS projects

3,064 564
stylelint-config-recommended-vue

The recommended shareable Vue config for Stylelint.

21,627,957 108
stylelint-config-standard-vue

The standard shareable Vue config for Stylelint.

5,099,255 27

Version History

Version Released License
1.2.0 Apache-2.0