Files
wallabag-mirror/stylelint.config.mjs
Rotzbua 3479b3de07 Chore: migrate stylelint from v1 to v2
Use esm for config. Preparation for full package esm conversion.
2026-08-05 00:26:02 +02:00

29 lines
1.2 KiB
JavaScript

/** @type {import('stylelint').Config} */
export default {
extends: ['stylelint-config-standard-scss'],
customSyntax: 'postcss-scss',
plugins: ['stylelint-scss'],
rules: {
'block-no-redundant-nested-style-rules': null,
'color-function-alias-notation': null,
'declaration-property-value-keyword-no-deprecated': null,
'property-no-deprecated': null,
'at-rule-no-unknown': null,
'no-duplicate-selectors': null,
'font-family-no-missing-generic-family-keyword': null,
'no-descending-specificity': null,
'scss/at-rule-no-unknown': true,
'media-feature-range-notation': null,
'selector-class-pattern': [
'^[a-z]([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$',
{
/** This option will resolve nested selectors with & interpolation. - https://stylelint.io/user-guide/rules/selector-class-pattern/#resolvenestedselectors-true--false-default-false */
resolveNestedSelectors: true,
message: function expected(selectorValue) {
return `Expected class selector "${selectorValue}" to match BEM CSS pattern https://en.bem.info/methodology/css. Selector validation tool: https://regexr.com/3apms`;
},
},
],
},
};