Blame view

泰额版/Food Labeling Management Code/Yi.Vben5.Vue3/internal/lint-configs/stylelint-config/index.mjs 3.06 KB
383e20a3   杨鑫   拉取
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
  export default {
    extends: ['stylelint-config-standard', 'stylelint-config-recess-order'],
    ignoreFiles: [
      '**/*.js',
      '**/*.jsx',
      '**/*.tsx',
      '**/*.ts',
      '**/*.json',
      '**/*.md',
    ],
    overrides: [
      {
        customSyntax: 'postcss-html',
        files: ['*.(html|vue)', '**/*.(html|vue)'],
        rules: {
          'selector-pseudo-class-no-unknown': [
            true,
            {
              ignorePseudoClasses: ['global', 'deep'],
            },
          ],
          'selector-pseudo-element-no-unknown': [
            true,
            {
              ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'],
            },
          ],
        },
      },
      {
        customSyntax: 'postcss-scss',
        extends: [
          'stylelint-config-recommended-scss',
          'stylelint-config-recommended-vue/scss',
        ],
        files: ['*.scss', '**/*.scss'],
      },
    ],
    plugins: [
      'stylelint-order',
      '@stylistic/stylelint-plugin',
      'stylelint-prettier',
      'stylelint-scss',
    ],
    rules: {
      'at-rule-no-deprecated': null,
      'at-rule-no-unknown': [
        true,
        {
          ignoreAtRules: [
            'extends',
            'ignores',
            'include',
            'mixin',
            'if',
            'else',
            'media',
            'for',
            'at-root',
            'tailwind',
            'apply',
            'variants',
            'responsive',
            'screen',
            'function',
            'each',
            'use',
            'forward',
            'return',
          ],
        },
      ],
      'font-family-no-missing-generic-family-keyword': null,
      'function-no-unknown': null,
      'import-notation': null,
      'media-feature-range-notation': null,
      'named-grid-areas-no-invalid': null,
      'no-descending-specificity': null,
      'no-empty-source': null,
      'order/order': [
        [
          'dollar-variables',
          'custom-properties',
          'at-rules',
          'declarations',
          {
            name: 'supports',
            type: 'at-rule',
          },
          {
            name: 'media',
            type: 'at-rule',
          },
          {
            name: 'include',
            type: 'at-rule',
          },
          'rules',
        ],
        { severity: 'error' },
      ],
      'prettier/prettier': true,
      'rule-empty-line-before': [
        'always',
        {
          ignore: ['after-comment', 'first-nested'],
        },
      ],
      'scss/at-rule-no-unknown': [
        true,
        {
          ignoreAtRules: [
            'extends',
            'ignores',
            'include',
            'mixin',
            'if',
            'else',
            'media',
            'for',
            'at-root',
            'tailwind',
            'apply',
            'variants',
            'responsive',
            'screen',
            'function',
            'each',
            'use',
            'forward',
            'return',
          ],
        },
      ],
      'scss/operator-no-newline-after': null,
      'selector-class-pattern':
        '^(?:(?:o|c|u|t|s|is|has|_|js|qa)-)?[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*(?:__[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:[.+])?$',
  
      'selector-not-notation': null,
    },
  };