feat: manually mirror opencoze's code from bytedance
Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
39
frontend/config/stylelint-config/.stylelintrc.js
Normal file
39
frontend/config/stylelint-config/.stylelintrc.js
Normal file
@@ -0,0 +1,39 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'stylelint-config-standard',
|
||||
'stylelint-config-standard-less',
|
||||
'stylelint-config-clean-order',
|
||||
],
|
||||
plugins: ['./plugins/plugin-disallow-nesting-level-one-global.js'],
|
||||
rules: {
|
||||
// 变量命名规则,适应仓库内的代码风格
|
||||
'custom-property-pattern': '^([A-Za-z0-9]*)([-_]+[A-Za-z0-9]+)*$',
|
||||
// 对于less函数判断有问题
|
||||
'less/no-duplicate-variables': null,
|
||||
'media-feature-range-notation': null,
|
||||
'max-nesting-depth': [
|
||||
3,
|
||||
{
|
||||
ignore: ['pseudo-classes'],
|
||||
ignoreRules: ['/:global/'],
|
||||
message: 'Expected nesting depth to be no more than 3.',
|
||||
},
|
||||
],
|
||||
'plugin/disallow-first-level-global': true,
|
||||
'selector-class-pattern': [
|
||||
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*(_[a-z0-9]+)?$',
|
||||
{
|
||||
resolveNestedSelectors: true,
|
||||
message: 'Expected class pattern is $block-$element_$modifier.',
|
||||
},
|
||||
],
|
||||
'declaration-no-important': true,
|
||||
'color-function-notation': null,
|
||||
'at-rule-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignoreAtRules: ['tailwind'],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user