-
Notifications
You must be signed in to change notification settings - Fork 1
/
.stylelintrc.js
57 lines (56 loc) · 1.51 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const { transpileModule } = require('typescript');
module.exports = {
processors: ['stylelint-processor-styled-components'],
extends: [
'stylelint-config-standard-less',
'stylelint-config-prettier',
'stylelint-config-recommended',
'stylelint-config-styled-components'
],
plugins: ['stylelint-prettier'],
overrides: [
{
files: 'packages/*/{src,lib}/**/*.less',
customSyntax: 'postcss-less'
},
{
files: 'packages/*/{src,lib}/**/{style.ts,element.ts}',
customSyntax: 'postcss-styled-syntax'
}
],
rules: {
// 关闭规则 null
'comment-empty-line-before': null,
'selector-descendant-combinator-no-non-space': null,
'no-descending-specificity': null,
'function-comma-newline-after': null,
'no-missing-end-of-source-newline': null,
'font-family-no-missing-generic-family-keyword': null,
'property-no-unknown': [
// 不允许未知的样式属性
null,
{
ignoreProperties: ['composes', ':global']
}
],
'selector-pseudo-class-no-unknown': [
// 不允许未知的选择器
null,
{
ignorePseudoClasses: [':global', ':horizontal', ':vertical']
}
],
'selector-class-pattern': [
'.*',
{
resolveNestedSelectors: true
}
],
'at-rule-no-unknown': null,
'import-notation': null,
'color-hex-length': null,
'alpha-value-notation': null,
'color-function-notation': 'legacy',
'selector-not-notation': ['simple', 'complex']
}
};