1 Star 2 Fork 0

张永峰 / vue3脚手架

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
stylelint.config.js 2.60 KB
一键复制 编辑 原始数据 按行查看 历史
module.exports = {
root: true,
defaultSeverity: 'error',
plugins: ['stylelint-order', 'stylelint-less'],
extends: [
'stylelint-config-standard', // the standard shareable config for Stylelint
'stylelint-config-html/html', // the shareable html config for Stylelint.
'stylelint-config-html/vue', // the shareable vue config for Stylelint.
'stylelint-config-recess-order', // use the clean order for properties
'stylelint-config-prettier', // turn off any rules that conflict with Prettier
],
rules: {
// 禁止在覆盖高特异性选择器之后出现低特异性选择器
'no-descending-specificity': null,
// 禁止空源码
'no-empty-source': null,
// 禁止字体族中缺少泛型族关键字
'font-family-no-missing-generic-family-keyword': null,
// 禁止未知的@规则
'at-rule-no-unknown': [
true,
{
ignoreAtRules: [
'tailwind',
'apply',
'variants',
'responsive',
'screen',
'function',
'if',
'each',
'include',
'mixin',
],
},
],
// 不允许未知函数
'function-no-unknown': null,
// 不允许未知单位
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
// 不允许选择器使用供应商前缀
'selector-no-vendor-prefix': null,
// 指定关键帧名称的模式
'keyframes-name-pattern': null,
// 指定类选择器的模式
'selector-class-pattern': null,
// 不允许值使用供应商前缀
'value-no-vendor-prefix': null,
// 要求或禁止在规则之前的空行
'rule-empty-line-before': ['always', { ignore: ['after-comment', 'first-nested'] }],
// 指定字符串使用单引号
'string-quotes': 'single',
// 指定@规则名的大小写
'at-rule-name-case': 'lower',
// 指定缩进
indentation: [2, { severity: 'warning' }],
},
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
overrides: [
{
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
customSyntax: 'postcss-html',
rules: {
// 禁止未知的伪类选择器
'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['deep', 'global'] }],
// 禁止未知的伪元素选择器
'selector-pseudo-element-no-unknown': [true, { ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'] }],
},
},
{
files: ['*.less', '**/*.less'],
customSyntax: 'postcss-less',
rules: {
'less/color-no-invalid-hex': true,
'less/no-duplicate-variables': true,
},
},
],
};
1
https://gitee.com/zhang_yong_feng11/vue3-scaffold.git
git@gitee.com:zhang_yong_feng11/vue3-scaffold.git
zhang_yong_feng11
vue3-scaffold
vue3脚手架
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891