chore(lint): 调整 lint 配置并修复规则问题

master-bpm-bug-fix
YunaiV 2026-06-20 07:01:20 -07:00
parent 2ea2d9b18f
commit 3208a76868
11 changed files with 43 additions and 10 deletions

View File

@ -7,5 +7,6 @@
/src/types/env.d.ts
/src/types/auto-components.d.ts
/src/types/auto-imports.d.ts
/src/components/Tinyflow/ui/**
/docs/**/*
CHANGELOG

View File

@ -3,4 +3,5 @@
public/*
/dist*
/src/types/env.d.ts
/src/components/Tinyflow/ui/**
/docs/**/*

View File

@ -17,7 +17,8 @@ export default tseslint.config(
'test/unit/coverage/',
'node_modules/',
'src/main.ts',
'src/types/auto-components.d.ts'
'src/types/auto-components.d.ts',
'src/components/Tinyflow/ui/**'
]
},
@ -61,6 +62,7 @@ export default tseslint.config(
'vue/attributes-order': 'off',
'vue/one-component-per-file': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/html-indent': 'off', // Vue 模板缩进交给 Prettier避免格式化规则互相拉扯。
'vue/max-attributes-per-line': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',

View File

@ -22,7 +22,7 @@
"lint": "pnpm lint:eslint:check && pnpm lint:style:check && pnpm lint:format:check",
"lint:eslint": "eslint --fix ./src --cache --cache-location node_modules/.cache/eslint/",
"lint:eslint:check": "eslint ./src --cache --cache-location node_modules/.cache/eslint/",
"lint:format": "prettier --write --loglevel warn --cache --cache-location node_modules/.cache/prettier/.prettier-cache \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
"lint:format": "prettier --write --log-level warn --cache --cache-location node_modules/.cache/prettier/.prettier-cache \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
"lint:format:check": "prettier --check --cache --cache-location node_modules/.cache/prettier/.prettier-cache \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
"lint:style": "stylelint --fix \"./src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:style:check": "stylelint \"./src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",

View File

@ -1,5 +1,7 @@
// IM mixin
// <style scoped lang="scss"> @use + @include
// Element Plus 使 BEM 线
/* stylelint-disable selector-class-pattern */
@mixin styles {
:deep(.el-dialog__body) {
padding: 0;
@ -7,7 +9,8 @@
}
:deep(.el-dialog__header) {
margin-right: 0;
padding-bottom: 16px;
margin-right: 0;
}
}
/* stylelint-enable selector-class-pattern */

View File

@ -76,7 +76,7 @@ const props = withDefaults(
defineProps<{
visible: boolean //
// x + top / bottom bottom picker 沿 @
position: { x: number; top?: number; bottom?: number }
position?: { x: number; top?: number; bottom?: number }
members: GroupMemberLite[] //
searchText?: string // @
canAtAll?: boolean // 当前用户是否能 @ 全员(群主 / 管理员父组件按角色算好传入

View File

@ -31,7 +31,7 @@
v-model="formData.data"
type="textarea"
:rows="4"
placeholder='请输入模板数据JSON 格式),例如:{"keyword1": {"value": "测试内容"}}'
:placeholder="templateDataPlaceholder"
/>
</el-form-item>
<el-form-item label="跳转链接" prop="url">
@ -56,6 +56,8 @@ import { MessageTemplateApi, MsgTemplateVO, MsgTemplateSendVO } from '@/api/mp/m
import * as MpUserApi from '@/api/mp/user'
const message = useMessage() //
const templateDataPlaceholder =
'请输入模板数据JSON 格式),例如:{"keyword1": {"value": "测试内容"}}'
const dialogVisible = ref(false) //
const loading = ref(false) //

View File

@ -13,7 +13,9 @@
<dict-tag :type="DICT_TYPE.PAY_ORDER_STATUS" :value="detailData.status" size="small" />
</el-descriptions-item>
<el-descriptions-item label="支付金额">
<el-tag type="success" size="small">{{ ((detailData.price || 0) / 100.0).toFixed(2) }}</el-tag>
<el-tag type="success" size="small"
>{{ ((detailData.price || 0) / 100.0).toFixed(2) }}</el-tag
>
</el-descriptions-item>
<el-descriptions-item label="手续费">
<el-tag type="warning" size="small">
@ -62,7 +64,7 @@
<el-divider />
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
<el-descriptions-item label="支付通道异步回调内容">
<el-text style="white-space: pre-wrap; word-break: break-word">
<el-text style="overflow-wrap: anywhere; white-space: pre-wrap">
{{ detailData.extension.channelNotifyData }}
</el-text>
</el-descriptions-item>

View File

@ -62,7 +62,7 @@
</el-descriptions>
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
<el-descriptions-item label="支付通道异步回调内容">
<el-text style="white-space: pre-wrap; word-break: break-word">
<el-text style="overflow-wrap: anywhere; white-space: pre-wrap">
{{ refundDetail.channelNotifyData }}
</el-text>
</el-descriptions-item>

View File

@ -40,7 +40,7 @@
<el-divider />
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
<el-descriptions-item label="转账渠道通知内容">
<el-text style="white-space: pre-wrap; word-break: break-word">
<el-text style="overflow-wrap: anywhere; white-space: pre-wrap">
{{ detailData.channelNotifyData }}
</el-text>
</el-descriptions-item>

View File

@ -13,7 +13,7 @@ module.exports = {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'extend']
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'extend', 'use']
}
],
'media-query-no-invalid': null,
@ -228,8 +228,30 @@ module.exports = {
{
ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted']
}
],
// Vue SFC 样式里会使用 @use、@include 等 SCSS at-rule。
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'extend', 'use']
}
],
// TagsView 使用的 WebKit 私有 mask 语法有效,但 Stylelint 不能完整识别。
'declaration-property-value-no-unknown': [
true,
{
ignoreProperties: {
'-webkit-mask-box-image': [/.*/]
}
}
]
}
},
// 独立 SCSS 文件不会被全局 postcss-html 语法完整检查。
// 先只让这个 IM 选择弹窗公共 partial 使用 SCSS parser暂不放大全量历史 SCSS 问题。
{
files: ['src/views/im/home/components/picker/picker-dialog.scss'],
customSyntax: 'postcss-scss'
}
]
}