1 Star 0 Fork 0

Kano Zhao / vite3-vue3-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.stylelintrc.cjs 2.60 KB
一键复制 编辑 原始数据 按行查看 历史
Kano Zhao 提交于 2022-12-13 15:12 . 配置Stylelint
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,
},
},
],
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Virkano/vite3-vue3-js.git
git@gitee.com:Virkano/vite3-vue3-js.git
Virkano
vite3-vue3-js
vite3-vue3-js
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891