Skip to content

Commit edfae1b

Browse files
author
白唯
committed
test(构建测试功能): 增加 vue-cli 官方但愿测试插件,添加测试用例,分模块测试,添加运行scripts
1 parent 3a25682 commit edfae1b

19 files changed

+1615
-453
lines changed

.czrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
"description": "bug 修复",
1919
"title": "修复"
2020
},
21+
"wip": {
22+
"description": "功能正在开发中,提交以切换其他分支进行其他开发",
23+
"title": "进行中"
24+
},
2125
"style": {
2226
"description": "UI相关",
2327
"title": "UI"

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vue.config.js

.eslintrc.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,25 @@ module.exports = {
55
},
66
env: {
77
browser: true,
8-
es6: true
8+
es6: true,
9+
node: true
910
},
1011
plugins: ['prettier', 'vue', '@typescript-eslint/eslint-plugin'],
1112
rules: {
1213
'prettier/prettier': 'error',
13-
'no-unused-vars': 'off'
14+
'no-unused-vars': 'off',
15+
'@typescript-eslint/no-explicit-any': 'off',
16+
'@typescript-eslint/member-delimiter-style': 'off',
17+
'@typescript-eslint/no-var-requires': 'off',
18+
'@typescript-eslint/ban-ts-ignore': 'off'
1419
},
15-
extends: ['standard', 'plugin:vue/essential', 'plugin:prettier/recommended']
20+
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/typescript/recommended'],
21+
overrides: [
22+
{
23+
files: ['**/tests/*.{j,t}s?(x)', '**/tests/**/*.spec.{j,t}s?(x)', '**/tests/*.spec.{j,t}s?(x)'],
24+
env: {
25+
mocha: true
26+
}
27+
}
28+
]
1629
}

.prettierrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
module.exports = {
2+
eslintIntegration: true,
3+
stylelintIntegration: true,
24
printWidth: 999,
35
singleQuote: true,
46
semi: false,

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM nginx:alpine
2+
COPY dist /usr/share/nginx/html

src/global.d.ts renamed to global.d.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ declare module '@vue/runtime-core' {
1111
$router: Router
1212
}
1313
}
14-
declare interface x {
15-
name: string
16-
age: number
14+
15+
declare global {
16+
interface X {
17+
name: string
18+
age: number
19+
}
20+
21+
interface X1 {
22+
s: string
23+
}
1724
}

0 commit comments

Comments
 (0)