@ozo/react-rock
Version:
React 移动端开发脚手架,基于CRA3,通用、开箱即用。
83 lines (79 loc) • 2.51 kB
JavaScript
// .stylelintrc.js
// https://stylelint.io/
// http://stylelint.cn/
// https://cloud.tencent.com/developer/section/1489630
// https://github.com/stylelint/stylelint-config-standard
// https://github.com/primer/primer/tree/master/tools/stylelint-config-primer
// https://github.com/prettier/stylelint-config-prettier
// https://github.com/hudochenkov/stylelint-order
// https://github.com/ice-lab/spec
const { stylelint, deepmerge } = require('@ice/spec');
module.exports = deepmerge(stylelint, {
rules: {
// 自定义的stylelint检测规则
'at-rule-empty-line-before': null,
'declaration-empty-line-before': 'never',
'at-rule-no-vendor-prefix': true,
'at-rule-no-unknown': null,
'block-closing-brace-newline-after': [
'always-multi-line',
{
ignoreAtRules: ['if', 'else', 'media'],
},
],
'block-no-empty': null,
'declaration-property-value-blacklist': [
{
border: [0],
},
],
indentation: 4,
'keyframe-declaration-no-important': true,
'max-nesting-depth': 5,
'number-leading-zero': 'never',
'no-descending-specificity': null,
'property-no-unknown': [
true,
{
ignoreProperties: ['composes'],
},
],
'property-no-vendor-prefix': [
true,
{
ignoreProperties: ['box-align', 'box-flex', 'box-orient'],
},
],
'selector-max-compound-selectors': 5,
'selector-max-specificity': null,
'selector-max-type': null,
'selector-no-qualifying-type': [
true,
{
ignore: ['attribute', 'class'],
},
],
'selector-no-vendor-prefix': [
true,
{
ignoreSelectors: ['::-webkit-input-placeholder', '/-moz-.*/'],
},
],
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['global'],
},
],
'string-quotes': 'single',
'unit-no-unknown': null,
'value-no-vendor-prefix': [
true,
{
ignoreValues: ['box', 'grab', 'max-content'],
},
],
'value-keyword-case': 'lower',
'order/order': [['custom-properties', 'declarations', 'rules', 'at-rules']],
},
});