Skip to content

Commit 2da9980

Browse files
committed
Chore: 升级依赖
1 parent 51f6d0a commit 2da9980

21 files changed

+1807
-1733
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ indent_size = 2
99
end_of_line = lf
1010
quote_type = single
1111
indent_style = space
12-
max_line_length = 80
12+
max_line_length = 100
1313
insert_final_newline = true
1414
spaces_around_operators = true
1515
trim_trailing_whitespace = true

.eslintrc.js

+26-6
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ module.exports = {
1313
extends: [
1414
'plugin:vue/recommended', // vue 代码风格预设
1515
'@vue/standard',
16-
'@vue/typescript',
16+
'@vue/typescript/recommended',
1717
],
1818
plugins: ['@typescript-eslint'],
1919
parserOptions: {
20-
parser: '@typescript-eslint/parser',
20+
ecmaVersion: 2020,
21+
// parser: '@typescript-eslint/parser',
2122
},
2223
overrides: [
2324
{
@@ -49,7 +50,7 @@ module.exports = {
4950
'max-len': [
5051
'error',
5152
{
52-
code: 80,
53+
code: 100,
5354
tabWidth: 2,
5455
ignoreUrls: true,
5556
ignoreStrings: true,
@@ -59,17 +60,36 @@ module.exports = {
5960
], // 最大列数
6061
'max-params': ['error', 7], // function最大参数数
6162
'max-statements': ['error', 120], // function最大语句数
62-
'curly': 'error', // 控制语句不允许省略大括号
63+
curly: 'error', // 控制语句不允许省略大括号
6364
'no-lonely-if': 'error',
6465
'no-dupe-else-if': 'error',
6566
'no-debugger': ENV,
6667
'no-console': [ENV, { allow: ['info', 'warn', 'error'] }],
68+
camelcase: ['error', { allow: ['^\\$_', '^_\\$'] }],
69+
'prefer-spread': 0,
70+
'prefer-rest-params': 0,
6771

68-
/// TSLint https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules ///
69-
'no-unused-vars': 'off',
72+
/// typescript-eslint https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules ///
73+
// 'no-unused-vars': 'off', // in extends
74+
'@typescript-eslint/camelcase': ['error', { allow: ['^\\$_', '^_\\$'] }],
7075
'@typescript-eslint/no-unused-vars': ENV,
76+
'@typescript-eslint/no-var-requires': 0,
77+
'@typescript-eslint/no-explicit-any': 0,
78+
'@typescript-eslint/no-empty-function': 'warn',
79+
'@typescript-eslint/no-empty-interface': 0,
7180
'@typescript-eslint/class-name-casing': 'error', // 类名 PascalCase
81+
'@typescript-eslint/no-use-before-define': [
82+
ENV,
83+
{ functions: false, classes: false },
84+
],
7285
'@typescript-eslint/interface-name-prefix': ['error', 'always'], // 接口I开头
86+
'@typescript-eslint/member-delimiter-style': [
87+
'error',
88+
{
89+
multiline: { delimiter: 'none' },
90+
singleline: { delimiter: 'semi' },
91+
},
92+
],
7393

7494
/// Vue https://eslint.vuejs.org/rules/ ///
7595
'vue/component-name-in-template-casing': 'error',

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"editor.tabSize": 2,
33
"editor.wordWrap": "on",
4-
"editor.wordWrapColumn": 80,
4+
"editor.wordWrapColumn": 100,
55
"editor.fontLigatures": true,
66
"editor.wrappingIndent": "indent",
77
"editor.detectIndentation": false,

README.md

+53-24
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ vue + vuex + vue router + TypeScript(支持 JavaScript) 模板
44

55
[更新日志](CHANGELOG.md)
66

7+
- [环境要求](#环境要求)
8+
- [建议开发环境](#建议开发环境)
9+
- [浏览器支持](#浏览器支持)
710
- [命令参考](#命令参考)
811
- [安装项目](#安装项目)
912
- [可选项](#可选项)
@@ -20,8 +23,6 @@ vue + vuex + vue router + TypeScript(支持 JavaScript) 模板
2023
- [优化](#优化)
2124
- [web 页面](#web%20页面)
2225
- [工程](#工程)
23-
- [IDE](#ide)
24-
- [浏览器支持](#浏览器支持)
2526
- [部署](<#部署(nginx)>)
2627
- [备忘](#备忘)
2728
- [文档](#文档)
@@ -30,6 +31,40 @@ vue + vuex + vue router + TypeScript(支持 JavaScript) 模板
3031
- [问题及思考](#问题及思考)
3132
- [其他](#其他)
3233

34+
## 环境要求
35+
36+
- `Node.js`: 建议 v12.13.1
37+
- `yarn`: 建议 v1.21.1
38+
39+
### 建议开发环境
40+
41+
- `Git`: 最新 代码管理
42+
- `Visual Studio Code` (VSCode): 最新 IDE
43+
44+
VSCode 插件
45+
46+
- `Vetur`: 最新 vue 开发必备
47+
- `GitLens`: 最新 Git 可视化工具
48+
- `ESLint`: 最新 脚本代码检查
49+
- `stylelint`: 最新 样式代码检查
50+
- `Prettier - Code formatter`: 最新 代码格式化
51+
52+
浏览器插件
53+
54+
- `Vue Devtools`: 最新
55+
56+
> 推荐工具: [`@vue/cli`](https://cli.vuejs.org/zh/guide), 全局安装时可使用 `vue ui` 命令启动图形化界面管理项目
57+
58+
> 推荐字体: [FiraCode](https://github.com/tonsky/FiraCode)
59+
60+
## 浏览器支持
61+
62+
支持现代浏览器及 IE10+
63+
64+
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
65+
| :-: | :-: | :-: | :-: |
66+
| IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
67+
3368
## 命令参考
3469

3570
### 安装项目
@@ -310,7 +345,21 @@ yarn vue-cli-service help # [命令] : 比如 yarn vue-cli-service help test:e2e
310345
- `js`: `.vue` 文件中使用, `JavaScript`
311346
- `vue`: `.jsx` 文件中使用, `JavaScript`
312347
- `vuex`: `.js` 文件中使用, `vuex module` class语法
313-
- 请[规范](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md)提交消息
348+
- **Git 提交信息规范**参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
349+
350+
- `Feat` 增加新功能
351+
- `Fix` 修复问题/BUG
352+
- `Style` 代码风格相关无影响运行结果的
353+
- `Perf` 优化/性能提升
354+
- `Refactor` 重构
355+
- `Polish` 润色
356+
- `Revert` 撤销修改
357+
- `Test` 测试相关
358+
- `Docs` 文档/注释
359+
- `Chore` 依赖更新/脚手架配置修改等
360+
- `Workflow` 工作流改进
361+
- `Ci` 持续集成
362+
- `Mod` 不确定分类的修改
314363
315364
### 其他
316365
@@ -527,27 +576,6 @@ yarn vue-cli-service help # [命令] : 比如 yarn vue-cli-service help test:e2e
527576
- 需要在 `yarn.lock` (或 `package-lock.json` ) 中, 指定**所有** `mini-css-extract-plugin` 的版本为 `package.json` 对应版本
528577
- 相同chunk下的基础样式(非皮肤样式)文件合并(比如css和scss)
529578
530-
### IDE
531-
532-
推荐使用: **Visual Studio Code** (VSCode), 推荐插件:
533-
534-
- Vetur: vue 开发必备
535-
- ESLint & stylelint: 代码检查
536-
- Prettier - Code formatter: 代码格式化
537-
- GitLens: Git 工具
538-
539-
> 推荐工具: [`@vue/cli`](https://cli.vuejs.org/zh/guide), 全局安装时可使用 `vue ui` 命令启动图形化界面管理项目
540-
541-
> 推荐字体: [FiraCode](https://github.com/tonsky/FiraCode)
542-
543-
## 浏览器支持
544-
545-
支持现代浏览器及 IE10+
546-
547-
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
548-
| :-: | :-: | :-: | :-: |
549-
| IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
550-
551579
## 部署(nginx)
552580
553581
- chunk hash 长度: 修改 [webpack.optimize.SplitChunksPlugin](node_modules/webpack/lib/optimize/SplitChunksPlugin.js)
@@ -683,6 +711,7 @@ http {
683711
- scss 模块化: 已出 beta 但生态不完善, [草案](https://github.com/sass/sass/blob/master/accepted/module-system.md)
684712
- [微前端化](https://github.com/phodal/microfrontends#复合型): 应考虑基于 [Web Components](https://developer.mozilla.org/zh-CN/docs/Web/Web_Components) ([vue 友好](https://cli.vuejs.org/zh/guide/build-targets.html#web-components-组件), 可以兼容其他) 的集成和通信.
685713
- `tsx` 类型支持(去掉`as any`, 利于重构)
714+
- 是否只下载当前皮肤(应无必要, 又不影响性能, 未验证移动端换肤方案是否可行)
686715
687716
### 其他
688717

babel.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ module.exports = {
2626
// '@babel/plugin-syntax-bigint',
2727
'@babel/plugin-proposal-function-sent',
2828
'@babel/plugin-proposal-private-methods',
29-
'@babel/plugin-proposal-optional-chaining',
29+
// '@babel/plugin-proposal-optional-chaining',
3030
'@babel/plugin-proposal-export-default-from',
3131
'@babel/plugin-proposal-export-namespace-from',
32-
'@babel/plugin-proposal-nullish-coalescing-operator',
32+
// '@babel/plugin-proposal-nullish-coalescing-operator',
3333
],
3434
}

build/devServer.js

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ module.exports = function(ENV) {
6262
port,
6363
https,
6464
proxy,
65+
clientLogLevel: 'warn',
6566
overlay: { errors: true }, // lint
6667
openPage: ENV.DEV_SERVER_PAGE || '',
6768
}

package.json

+26-28
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-tpl",
33
"author": "毛瑞 <[email protected]>",
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"private": false,
66
"license": "MIT",
77
"keywords": [
@@ -27,76 +27,74 @@
2727
"test:unit": "npx --max_old_space_size=4096 vue-cli-service test:unit --detectOpenHandles --coverage"
2828
},
2929
"dependencies": {
30-
"axios": "^0.19.1",
30+
"axios": "^0.19.2",
3131
"core-js": "^3.6.4",
32-
"crypto-js": "^3.1.9-1",
32+
"crypto-js": "^3.3.0",
3333
"d3": "^5.15.0",
3434
"echarts": "^4.6.0",
3535
"element-ui": "^2.13.0",
3636
"jsencrypt": "^3.0.0-rc.1",
3737
"luma.gl": "^7.3.2",
3838
"normalize.css": "^8.0.1",
3939
"nprogress": "^0.2.0",
40-
"pixi.js": "^5.2.0",
41-
"pixi.js-legacy": "^5.2.0",
40+
"pixi.js": "^5.2.1",
41+
"pixi.js-legacy": "^5.2.1",
4242
"register-service-worker": "^1.6.2",
43-
"three": "^0.112.1",
43+
"three": "^0.113.2",
4444
"vue": "^2.6.11",
4545
"vue-class-component": "^7.2.2",
4646
"vue-i18n": "^8.15.3",
47-
"vue-property-decorator": "^8.3.0",
47+
"vue-property-decorator": "^8.4.0",
4848
"vue-router": "^3.1.5",
4949
"vuex": "^3.1.2",
5050
"vuex-class": "^0.3.2",
51-
"vuex-module-decorators": "^0.11.0",
51+
"vuex-module-decorators": "^0.16.1",
5252
"zdog": "^1.1.1",
5353
"zrender": "^4.2.0"
5454
},
5555
"devDependencies": {
5656
"@babel/plugin-proposal-export-default-from": "^7.8.3",
5757
"@babel/plugin-proposal-export-namespace-from": "^7.8.3",
5858
"@babel/plugin-proposal-function-sent": "^7.8.3",
59-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
60-
"@babel/plugin-proposal-optional-chaining": "^7.8.3",
6159
"@babel/plugin-proposal-private-methods": "^7.8.3",
6260
"@types/crypto-js": "^3.1.43",
6361
"@types/d3": "^5.7.2",
64-
"@types/echarts": "^4.4.2",
65-
"@types/jest": "^24.9.0",
66-
"@typescript-eslint/eslint-plugin": "^2.17.0",
67-
"@typescript-eslint/parser": "^2.17.0",
68-
"@vue/cli-plugin-babel": "^4.1.2",
69-
"@vue/cli-plugin-e2e-cypress": "^4.1.2",
70-
"@vue/cli-plugin-eslint": "^4.1.2",
71-
"@vue/cli-plugin-pwa": "^4.1.2",
72-
"@vue/cli-plugin-router": "^4.1.2",
73-
"@vue/cli-plugin-typescript": "^4.1.2",
74-
"@vue/cli-plugin-unit-jest": "^4.1.2",
75-
"@vue/cli-plugin-vuex": "^4.1.2",
76-
"@vue/cli-service": "^4.1.2",
77-
"@vue/eslint-config-standard": "^5.1.0",
62+
"@types/echarts": "^4.4.3",
63+
"@types/jest": "^25.1.2",
64+
"@typescript-eslint/eslint-plugin": "^2.19.2",
65+
"@typescript-eslint/parser": "^2.19.2",
66+
"@vue/cli-plugin-babel": "^4.2.2",
67+
"@vue/cli-plugin-e2e-cypress": "^4.2.2",
68+
"@vue/cli-plugin-eslint": "^4.2.2",
69+
"@vue/cli-plugin-pwa": "^4.2.2",
70+
"@vue/cli-plugin-router": "^4.2.2",
71+
"@vue/cli-plugin-typescript": "^4.2.2",
72+
"@vue/cli-plugin-unit-jest": "^4.2.2",
73+
"@vue/cli-plugin-vuex": "^4.2.2",
74+
"@vue/cli-service": "^4.2.2",
75+
"@vue/eslint-config-standard": "^5.1.1",
7876
"@vue/eslint-config-typescript": "^5.0.1",
7977
"@vue/test-utils": "^1.0.0-beta.31",
8078
"compression-webpack-plugin": "^3.1.0",
8179
"eslint": "^6.8.0",
82-
"eslint-plugin-import": "^2.20.0",
80+
"eslint-plugin-import": "^2.20.1",
8381
"eslint-plugin-node": "^11.0.0",
8482
"eslint-plugin-promise": "^4.2.1",
8583
"eslint-plugin-standard": "^4.0.1",
8684
"eslint-plugin-vue": "^6.1.2",
8785
"fibers": "^4.0.2",
8886
"hard-source-webpack-plugin": "^0.13.1",
89-
"lint-staged": "^10.0.1",
87+
"lint-staged": "^10.0.7",
9088
"mini-css-extract-plugin": "Maorey/alternate-css-extract-plugin#8cb509511d4acc77f4a48509edca8f2ee899da21",
9189
"postcss-preset-env": "^6.7.0",
9290
"regenerate": "^1.4.0",
9391
"regjsgen": "^0.5.1",
9492
"regjsparser": "^0.6.2",
9593
"sass": "^1.25.0",
9694
"sass-loader": "^8.0.2",
97-
"stylelint": "^13.0.0",
95+
"stylelint": "^13.1.0",
9896
"stylelint-config-scss-maorey": "^1.1.1",
99-
"stylelint-webpack-plugin": "^1.2.1",
97+
"stylelint-webpack-plugin": "^1.2.3",
10098
"typescript": "^3.7.5",
10199
"unicode-match-property-ecmascript": "^1.0.4",
102100
"unicode-match-property-value-ecmascript": "^1.1.0",

0 commit comments

Comments
 (0)