-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstylelint.config.js
More file actions
26 lines (26 loc) · 1.26 KB
/
stylelint.config.js
File metadata and controls
26 lines (26 loc) · 1.26 KB
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
module.exports = {
ignoreFiles: ['**/*.js', '**/*.md', '**/*.ts', '**/*.tsx'],
extends: [
'stylelint-config-standard-scss',
'stylelint-config-recommended-vue',
'stylelint-config-rational-order',
'stylelint-config-prettier',
],
plugins: ['stylelint-declaration-block-no-ignored-properties'],
rules: {
'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]+)*)?(?:\\[.+\\])?$', // 允许BEM命名格式
'comment-empty-line-before': null, // 要求或禁止在注释之前有空行
'function-name-case': ['lower', { ignoreFunctions: ['/colorPalette/'] }], // 指定函数名称的大小写,当使用 lower 选项时,函数名称使用驼峰式大小写,如 translateX。
'no-invalid-double-slash-comments': null, // 禁用 CSS 不支持的双斜线注释
'no-descending-specificity': null, // 禁止低优先级的选择器出现在高优先级的选择器之后
'no-invalid-position-at-import-rule': null,
'declaration-empty-line-before': null, // 要求或禁止在声明语句之前有空行
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['deep'],
},
],
},
};