1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34export default {
extends: [
'stylelint-config-html',
'stylelint-config-recommended-scss',
'stylelint-config-recommended-vue/scss',
],
plugins: [
'stylelint-order',
'@kong/design-tokens/stylelint-plugin',
'@stylistic/stylelint-plugin',
],
rules: {
'unit-disallowed-list': ['rem', 'em'],
'order/properties-alphabetical-order': true,
'@kong/design-tokens/use-proper-token': true,
'@stylistic/indentation': [2, { baseIndentLevel: 0 }],
// Only allow @kong/design-tokens CSS custom properties
'custom-property-pattern': [
'^(kui-).+$',
{
message: "Expected custom property \"%s\" to be sourced from @kong/design-tokens with prefix '--kui-'",
},
],
'rule-empty-line-before': ['always', { ignore: ['after-comment', 'first-nested'] }],
'@stylistic/block-opening-brace-space-before': 'always',
'@stylistic/declaration-colon-space-after': 'always',
'@stylistic/media-feature-colon-space-after': 'always',
'scss/declaration-property-value-no-unknown': true,
// Disable the following rules
'custom-property-no-missing-var-function': null,
'no-descending-specificity': null,
},
}