-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.ts
71 lines (70 loc) · 2.18 KB
/
index.ts
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
export const stylelint = {
$schema: 'https://json.schemastore.org/stylelintrc',
extends: [
require.resolve('@umijs/lint/dist/config/stylelint'),
'stylelint-config-recommended',
'stylelint-config-clean-order',
],
overrides: [
{
customSyntax: 'postcss-less',
files: ['*.less', '*.css'],
plugins: ['stylelint-less'],
rules: {
'at-rule-no-unknown': undefined,
'color-no-invalid-hex': true,
'function-no-unknown': undefined,
'less/color-no-invalid-hex': true,
},
},
{
customSyntax: 'postcss-styled-syntax',
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
rules: {
'no-empty-source': undefined,
'no-invalid-double-slash-comments': undefined,
'no-missing-end-of-source-newline': undefined,
'property-no-vendor-prefix': true,
'value-no-vendor-prefix': true,
},
},
{
files: ['*.less'],
rules: {
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['global'],
},
],
},
},
],
plugins: ['stylelint-order'],
// ~ merge from stylelint-config-tenx
rules: {
'comment-empty-line-before': undefined,
'declaration-empty-line-before': undefined,
'function-comma-newline-after': undefined,
'function-name-case': undefined,
'function-parentheses-newline-inside': undefined,
'function-max-empty-lines': undefined,
'function-whitespace-after': undefined,
'indentation': undefined,
'no-descending-specificity': undefined,
'number-leading-zero': undefined,
'number-no-trailing-zeros': undefined,
'rule-empty-line-before': undefined,
'selector-combinator-space-after': undefined,
'selector-list-comma-newline-after': undefined,
'selector-pseudo-element-colon-notation': undefined,
'unit-no-unknown': undefined,
'value-list-max-empty-lines': undefined,
'alpha-value-notation': 'number',
'selector-class-pattern': undefined,
'selector-id-pattern': undefined,
// ~ disable deprecated rules
'media-feature-range-operator-space-after': undefined,
'media-feature-range-operator-space-before': undefined,
},
};