forked from Kong/public-ui-components
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.stylelintrc.js
37 lines (37 loc) · 1.08 KB
/
.stylelintrc.js
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
34
35
36
37
module.exports = {
extends: [
'stylelint-config-html',
'stylelint-config-recommended-scss',
'stylelint-config-recommended-vue/scss'
],
ignoreFiles: [
'packages/cli/src/__template__/**/*'
],
overrides: [
{
files: [
'packages/**/src/**/*.{css,scss,sass,less,styl,vue}',
],
rules: {
// Disallow relative font units
'unit-disallowed-list': ['rem', 'em'],
'@kong/design-tokens/use-proper-token': true,
// Only allow @kong/design-tokens or `--kong-ui-*` CSS custom properties
'custom-property-pattern': [
"^(kui-|kong-ui-).+$",
{
message: "Expected custom property \"%s\" to have prefix '--kong-ui-' or be sourced from @kong/design-tokens with prefix '--kui-'",
}
],
'custom-property-no-missing-var-function': true,
// Disable the following rules
'no-descending-specificity': null,
}
}
],
plugins: [
'stylelint-order',
'@kong/design-tokens/stylelint-plugin',
],
rules: { 'order/properties-alphabetical-order': true }
}