mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +00:00
refactor: 优化前端代码结构和资源管理 style: 调整前端代码格式和样式 chore: 更新.gitignore和构建配置 fix: 修复前端资源路径和引用问题 docs: 更新前端文档和注释 perf: 优化前端性能和加载速度 test: 更新前端测试用例 build: 调整前端构建配置 ci: 更新CI/CD配置
61 lines
1.9 KiB
JavaScript
61 lines
1.9 KiB
JavaScript
module.exports = {
|
|
// 继承推荐规范配置
|
|
extends: [
|
|
"stylelint-config-standard",
|
|
"stylelint-config-recommended",
|
|
"stylelint-config-recommended-scss",
|
|
"stylelint-config-recommended-vue/scss",
|
|
"stylelint-config-html/vue",
|
|
"stylelint-config-recess-order",
|
|
],
|
|
plugins: [
|
|
"stylelint-prettier", // 统一代码风格,格式冲突时以 Prettier 规则为准
|
|
],
|
|
// 指定不同文件对应的解析器
|
|
overrides: [
|
|
{
|
|
files: ["**/*.{vue,html}"],
|
|
customSyntax: "postcss-html",
|
|
},
|
|
{
|
|
files: ["**/*.{css,scss}"],
|
|
customSyntax: "postcss-scss",
|
|
},
|
|
],
|
|
// 自定义规则
|
|
rules: {
|
|
"prettier/prettier": true, // 强制执行 Prettier 格式化规则(需配合 .prettierrc 配置文件)
|
|
"declaration-property-value-no-unknown": null, // 允许非常规数值格式 ,如 height: calc(100% - 50)
|
|
// Tailwind CSS v4 使用 @reference 引入主题而不注入样式,需放行
|
|
"scss/at-rule-no-unknown": [
|
|
true,
|
|
{
|
|
ignoreAtRules: ["reference"],
|
|
},
|
|
],
|
|
"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, // 允许空样式
|
|
"property-no-vendor-prefix": null, // 允许属性前缀
|
|
// 允许 global 、export 、deep伪类
|
|
"selector-pseudo-class-no-unknown": [
|
|
true,
|
|
{
|
|
ignorePseudoClasses: ["global", "export", "deep"],
|
|
},
|
|
],
|
|
// 允许未知属性
|
|
"property-no-unknown": [
|
|
true,
|
|
{
|
|
ignoreProperties: [],
|
|
},
|
|
],
|
|
// 允许未知规则
|
|
"at-rule-no-unknown": null, // 禁用默认的未知 at-rule 检查,
|
|
},
|
|
};
|