chore(lint): 调整 lint 配置并修复规则问题
parent
2ea2d9b18f
commit
3208a76868
|
|
@ -7,5 +7,6 @@
|
||||||
/src/types/env.d.ts
|
/src/types/env.d.ts
|
||||||
/src/types/auto-components.d.ts
|
/src/types/auto-components.d.ts
|
||||||
/src/types/auto-imports.d.ts
|
/src/types/auto-imports.d.ts
|
||||||
|
/src/components/Tinyflow/ui/**
|
||||||
/docs/**/*
|
/docs/**/*
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,5 @@
|
||||||
public/*
|
public/*
|
||||||
/dist*
|
/dist*
|
||||||
/src/types/env.d.ts
|
/src/types/env.d.ts
|
||||||
|
/src/components/Tinyflow/ui/**
|
||||||
/docs/**/*
|
/docs/**/*
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ export default tseslint.config(
|
||||||
'test/unit/coverage/',
|
'test/unit/coverage/',
|
||||||
'node_modules/',
|
'node_modules/',
|
||||||
'src/main.ts',
|
'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/attributes-order': 'off',
|
||||||
'vue/one-component-per-file': 'off',
|
'vue/one-component-per-file': 'off',
|
||||||
'vue/html-closing-bracket-newline': 'off',
|
'vue/html-closing-bracket-newline': 'off',
|
||||||
|
'vue/html-indent': 'off', // Vue 模板缩进交给 Prettier,避免格式化规则互相拉扯。
|
||||||
'vue/max-attributes-per-line': 'off',
|
'vue/max-attributes-per-line': 'off',
|
||||||
'vue/multiline-html-element-content-newline': 'off',
|
'vue/multiline-html-element-content-newline': 'off',
|
||||||
'vue/singleline-html-element-content-newline': 'off',
|
'vue/singleline-html-element-content-newline': 'off',
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"lint": "pnpm lint:eslint:check && pnpm lint:style:check && pnpm lint:format:check",
|
"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": "eslint --fix ./src --cache --cache-location node_modules/.cache/eslint/",
|
||||||
"lint:eslint:check": "eslint ./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: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": "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/",
|
"lint:style:check": "stylelint \"./src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
// IM 选择类弹窗的公共样式 mixin
|
// IM 选择类弹窗的公共样式 mixin
|
||||||
// 每个业务壳在自己的 <style scoped lang="scss"> 内 @use + @include 即可,避免全局污染
|
// 每个业务壳在自己的 <style scoped lang="scss"> 内 @use + @include 即可,避免全局污染
|
||||||
|
// Element Plus 内部类名使用 BEM 双下划线,不适合套项目自定义类名规则
|
||||||
|
/* stylelint-disable selector-class-pattern */
|
||||||
@mixin styles {
|
@mixin styles {
|
||||||
:deep(.el-dialog__body) {
|
:deep(.el-dialog__body) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
@ -7,7 +9,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-dialog__header) {
|
:deep(.el-dialog__header) {
|
||||||
margin-right: 0;
|
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* stylelint-enable selector-class-pattern */
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
visible: boolean // 是否显示
|
visible: boolean // 是否显示
|
||||||
// 浮层位置:x 横坐标 + top / bottom 二选一(bottom 锚定时 picker 下沿贴 @ 上方)
|
// 浮层位置:x 横坐标 + top / bottom 二选一(bottom 锚定时 picker 下沿贴 @ 上方)
|
||||||
position: { x: number; top?: number; bottom?: number }
|
position?: { x: number; top?: number; bottom?: number }
|
||||||
members: GroupMemberLite[] // 当前群的成员列表
|
members: GroupMemberLite[] // 当前群的成员列表
|
||||||
searchText?: string // @ 后输入的过滤文本
|
searchText?: string // @ 后输入的过滤文本
|
||||||
canAtAll?: boolean // 当前用户是否能 @ 全员(群主 / 管理员),父组件按角色算好传入
|
canAtAll?: boolean // 当前用户是否能 @ 全员(群主 / 管理员),父组件按角色算好传入
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
v-model="formData.data"
|
v-model="formData.data"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
placeholder='请输入模板数据(JSON 格式),例如:{"keyword1": {"value": "测试内容"}}'
|
:placeholder="templateDataPlaceholder"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="跳转链接" prop="url">
|
<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'
|
import * as MpUserApi from '@/api/mp/user'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
const templateDataPlaceholder =
|
||||||
|
'请输入模板数据(JSON 格式),例如:{"keyword1": {"value": "测试内容"}}'
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗是否展示
|
const dialogVisible = ref(false) // 弹窗是否展示
|
||||||
const loading = ref(false) // 提交加载中
|
const loading = ref(false) // 提交加载中
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,9 @@
|
||||||
<dict-tag :type="DICT_TYPE.PAY_ORDER_STATUS" :value="detailData.status" size="small" />
|
<dict-tag :type="DICT_TYPE.PAY_ORDER_STATUS" :value="detailData.status" size="small" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="支付金额">
|
<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>
|
||||||
<el-descriptions-item label="手续费">
|
<el-descriptions-item label="手续费">
|
||||||
<el-tag type="warning" size="small">
|
<el-tag type="warning" size="small">
|
||||||
|
|
@ -62,7 +64,7 @@
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
|
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
|
||||||
<el-descriptions-item label="支付通道异步回调内容">
|
<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 }}
|
{{ detailData.extension.channelNotifyData }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
|
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
|
||||||
<el-descriptions-item label="支付通道异步回调内容">
|
<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 }}
|
{{ refundDetail.channelNotifyData }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
|
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
|
||||||
<el-descriptions-item label="转账渠道通知内容">
|
<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 }}
|
{{ detailData.channelNotifyData }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ module.exports = {
|
||||||
'at-rule-no-unknown': [
|
'at-rule-no-unknown': [
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'extend']
|
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'extend', 'use']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'media-query-no-invalid': null,
|
'media-query-no-invalid': null,
|
||||||
|
|
@ -228,8 +228,30 @@ module.exports = {
|
||||||
{
|
{
|
||||||
ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted']
|
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'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue