module.exports = { defaultSeverity: 'warning', extends: ['stylelint-config-standard-scss', 'stylelint-config-recess-order', 'stylelint-config-recommended-vue'], plugins: ['stylelint-declaration-block-no-ignored-properties'], rules: { 'scss/no-global-function-names': null, 'plugin/declaration-block-no-ignored-properties': true, 'order/properties-alphabetical-order': null, 'no-descending-specificity': null, // 样式块中不允许重复的属性 'declaration-block-no-duplicate-properties': true, // 指定颜色函数使用传统符号隔开 'color-function-notation': 'legacy', // 函数 url 链接不允许 shceme relative 'function-url-no-scheme-relative': true, // 可组合成一个属性的写法,不允许拆开书写 'declaration-block-no-redundant-longhand-properties': true, // 选择器最大深度 'selector-max-compound-selectors': 8, // 限制 id选择器的数目在一个选择器中 'selector-max-id': 1, // 最多2个类型选择器 'selector-max-type': 2, // 不允许未知的动画 'no-unknown-animations': true, // 在字体名称必须使用引号的地方使用引号,其他地方不能使用 'font-family-name-quotes': 'always-unless-keyword', // url 函数内部必须有引号 'function-url-quotes': 'always', // 为类选择器指定一个模式 'selector-class-pattern': null, 'at-rule-no-unknown': [true, { ignoreAtRules: ['import', 'include', 'mixin', 'include', 'extend', 'each'] }], 'max-nesting-depth': [8, { ignore: ['blockless-at-rules', 'pseudo-classes'] }], 'selector-no-qualifying-type': [true, { ignore: ['attribute', 'class', 'id'] }], 'value-keyword-case': ['lower', { camelCaseSvgKeywords: true }], 'value-no-vendor-prefix': [true, { ignoreValues: ['box'] }], 'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['deep'] }] // 'declaration-property-value-no-unknown': [true, { ignoreProperties: { '/.+/': '/^v-bind(.*)$/' } }] } };