1 Star 1 Fork 0

huiyong.rao/vite-vue2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
stylelint.config.cjs 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
huiyong.rao 提交于 2023-08-01 14:26 +08:00 . chore: 优化
module.exports = {
// 继承推荐规范配置
extends: [
'stylelint-config-standard',
'stylelint-config-recommended-scss',
'stylelint-config-recommended-vue/scss',
'stylelint-config-html/vue',
'stylelint-config-recess-order'
],
// 指定不同文件对应的解析器
overrides: [
{
files: ['**/*.{vue}'],
customSyntax: 'postcss-html',
rules: {}
},
{
files: ['**/*.{scss}'],
customSyntax: 'postcss-scss',
rules: {
// 允许未知属性
'property-no-unknown': [
true
// {
// ignoreProperties: ['theme']
// }
]
}
}
],
// 自定义规则
rules: {
'import-notation': 'string', // 指定导入CSS文件的方式("string"|"url")
'selector-class-pattern': null, // 选择器类名命名规则
'custom-property-pattern': null, // 自定义属性命名规则
'keyframes-name-pattern': null, // 动画帧节点样式命名规则
'no-descending-specificity': null, // 允许无降序特异性
'no-empty-source': null, // 禁止内容为空
'alpha-value-notation': 'number', // 为 alpha 值指定百分比或数字表示法
'color-function-notation': 'legacy', // 为颜色函数指定现代或遗留符号
'media-feature-range-notation': 'prefix', // 为媒体特性范围指定上下文或前缀表示法
'scss/at-import-partial-extension': 'always', // 在@import 命令中要求或不允许扩展名
// 禁止未知的伪类选择器
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['global', 'export', 'deep']
}
],
// 禁止未知的伪元素选择器
'selector-pseudo-element-no-unknown': [
true,
{ ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'] }
],
'scss/no-global-function-names': null,
'declaration-block-no-redundant-longhand-properties': [
true,
{
ignoreShorthands: ['inset']
}
]
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/raohuiyong/vite-vue2.git
git@gitee.com:raohuiyong/vite-vue2.git
raohuiyong
vite-vue2
vite-vue2
master

搜索帮助