-
Notifications
You must be signed in to change notification settings - Fork 5
/
stylelint.config.js
53 lines (50 loc) · 1.21 KB
/
stylelint.config.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
const path = require('path');
const fg = require('fast-glob');
const cssPaths = fg.sync([path.resolve(__dirname, 'packages/**/src/**/*.css'), '!**/node_modules']);
module.exports = {
allowEmptyInput: true,
extends: ['stylelint-config-standard'],
plugins: ['stylelint-value-no-unknown-custom-properties'],
rules: {
'declaration-no-important': true,
'custom-property-pattern': null,
'selector-class-pattern': null,
'block-no-empty': null,
'hue-degree-notation': 'number',
'alpha-value-notation': 'number',
'csstools/value-no-unknown-custom-properties': [
true,
{
importFrom: [
path.resolve(__dirname, 'packages/tokens/dist/index.css'),
path.resolve(__dirname, 'packages/tokens/dist/themes.css'),
...cssPaths,
],
},
],
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['global', 'value'],
},
],
'selector-not-notation': null,
'import-notation': 'string',
'media-feature-range-notation': 'prefix',
'property-no-unknown': [
true,
{
ignoreProperties: [
// https://lightningcss.dev/css-modules.html#class-composition
'composes',
],
},
],
'number-max-precision': [
4,
{
ignoreUnits: ['rem'],
},
],
},
};