vite-vue3-lowcode/stylelint.config.js

94 lines
2.2 KiB
JavaScript
Raw Normal View History

2021-05-26 22:15:13 +08:00
module.exports = {
root: true,
2022-01-01 01:31:04 +08:00
plugins: ['stylelint-order'],
customSyntax: 'postcss-html',
2021-05-26 22:15:13 +08:00
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
rules: {
2022-01-01 01:31:04 +08:00
'selector-class-pattern': null,
2021-05-26 22:15:13 +08:00
'selector-pseudo-class-no-unknown': [
true,
{
2022-01-01 01:31:04 +08:00
ignorePseudoClasses: ['global'],
},
2021-05-26 22:15:13 +08:00
],
'selector-pseudo-element-no-unknown': [
true,
{
2022-01-01 01:31:04 +08:00
ignorePseudoElements: ['v-deep'],
},
2021-05-26 22:15:13 +08:00
],
'at-rule-no-unknown': [
true,
{
2022-01-01 01:31:04 +08:00
ignoreAtRules: [
'tailwind',
'apply',
'variants',
'responsive',
'screen',
'function',
'if',
'each',
'include',
'mixin',
],
},
2021-05-26 22:15:13 +08:00
],
'no-empty-source': null,
'named-grid-areas-no-invalid': null,
'unicode-bom': 'never',
'no-descending-specificity': null,
'font-family-no-missing-generic-family-keyword': null,
'declaration-colon-space-after': 'always-single-line',
'declaration-colon-space-before': 'never',
2022-01-01 01:31:04 +08:00
// 'declaration-block-trailing-semicolon': 'always',
2021-05-26 22:15:13 +08:00
'rule-empty-line-before': [
'always',
{
2022-01-01 01:31:04 +08:00
ignore: ['after-comment', 'first-nested'],
},
2021-05-26 22:15:13 +08:00
],
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
'order/order': [
[
'dollar-variables',
'custom-properties',
'at-rules',
'declarations',
{
type: 'at-rule',
2022-01-01 01:31:04 +08:00
name: 'supports',
2021-05-26 22:15:13 +08:00
},
{
type: 'at-rule',
2022-01-01 01:31:04 +08:00
name: 'media',
2021-05-26 22:15:13 +08:00
},
2022-01-01 01:31:04 +08:00
'rules',
2021-05-26 22:15:13 +08:00
],
2022-01-01 01:31:04 +08:00
{ severity: 'warning' },
2021-05-26 22:15:13 +08:00
],
},
2022-01-01 01:31:04 +08:00
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
overrides: [
{
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
extends: ['stylelint-config-recommended', 'stylelint-config-html'],
rules: {
'keyframes-name-pattern': null,
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['deep', 'global'],
},
],
'selector-pseudo-element-no-unknown': [
true,
{
ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'],
},
],
},
},
],
};