-
引入代码规范,ESLint、prettier
关闭所有不必要的规则或可能与Prettier冲突的规则
运行Prettier作为Eslint规则,并报告差异个别ESLint问题
yarn add -D eslint prettier eslint-config-prettier eslint-plugin-prettier # .eslintrc.json { "extends": ["plugin:prettier/recommended"] } # .vscode/settings.json { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, "eslint.validate": ["typescript"], "files.eol": "\n" }
-
添加ts相关配置
一个利用TypeScript ESTree 允许ESLint整理TypeScript源代码的ESLint解析器
添加或扩展具有TypeScript特定功能的规则
yarn add typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin # .eslintrc.json { "parser": "@typescript-eslint/parser", "extends": ["plugin:prettier/recommended"], # 添加eslint对es6语法的识别 "parserOptions": { "ecmaVersion": 6 }, "plugins": ["@typescript-eslint"] }
-
配置webpack对ts代码的解析
yarn add ts-loader
ztapputils
1.3.42 • Public • PublishedVersions
Current Tags
- VersionDownloads (Last 7 Days)
- Tag
- 1.3.426
- latest
Version History
- VersionDownloads (Last 7 Days)
- Published
- 1.3.426
- 1.3.411
- 10.0.10
- 10.0.00
- 1.3.400
- 1.3.390
- 3.0.00
- 1.3.380
- 1.3.370
- 1.3.360
- 1.3.350
- 1.3.340
- 1.3.330
- 1.3.320
- 1.3.310
- 1.3.300
- 1.3.290
- 1.3.280
- 1.3.270
- 1.3.260
- 1.3.250
- 1.3.240
- 1.3.230
- 1.3.220
- 1.3.210
- 1.3.200
- 1.3.190
- 1.3.180
- 1.3.170
- 1.3.160
- 1.3.150
- 1.3.140
- 1.3.130
- 1.3.120
- 1.3.110
- 1.3.100
- 1.3.90
- 1.3.80
- 1.3.70
- 1.3.60
- 1.3.50
- 1.3.40
- 1.3.30
- 1.3.20
- 1.3.10
- 1.3.00
- 1.2.150
- 1.2.140
- 1.2.130
- 1.2.120
- 1.2.110
- 1.2.100
- 1.2.90
- 1.2.80
- 1.2.70
- 1.2.60
- 1.2.50
- 1.2.30
- 1.2.20
- 1.2.10
- 1.2.00
- 1.1.190
- 1.1.180
- 1.1.170
- 1.1.160
- 1.1.150
- 1.1.140
- 1.1.130
- 1.1.120
- 1.1.110
- 1.1.100
- 1.1.90
- 1.1.80
- 1.1.70
- 1.1.60
- 1.1.50
- 1.1.40
- 1.1.20
- 1.1.10
- 1.1.00
- 1.0.90
- 1.0.80
- 1.0.70
- 1.0.60
- 1.0.50
- 1.0.40
- 1.0.30
- 1.0.20
- 1.0.10
- 1.0.00
- 0.9.90
- 0.9.80
- 0.9.70
- 0.9.60
- 0.9.50
- 0.9.40
- 0.9.30
- 0.9.20
- 0.9.10
- 0.9.00
- 0.8.90
- 0.8.80
- 0.8.70
- 0.8.60
- 0.8.50
- 0.8.40
- 0.8.30
- 0.8.20
- 0.8.10
- 0.8.00
- 0.7.90
- 0.7.80
- 0.7.70
- 0.7.60
- 0.7.50
- 0.7.40
- 0.7.30
- 0.7.20
- 0.7.10
- 0.7.00
- 0.6.90
- 0.6.80
- 0.6.70
- 0.6.60
- 0.6.50
- 0.6.40
- 0.6.20
- 0.6.10
- 0.6.00
- 0.5.90
- 0.5.80
- 0.5.70
- 0.5.60
- 0.5.50
- 0.5.40
- 0.5.30
- 0.5.20
- 0.5.10
- 0.5.00
- 0.4.90
- 0.4.80
- 0.4.70
- 0.4.60
- 0.4.50
- 0.4.40
- 0.4.30
- 0.4.20
- 0.4.10
- 0.4.00
- 0.3.90
- 0.3.80
- 0.3.70
- 0.3.60
- 0.3.50
- 0.3.40
- 0.3.30
- 0.3.20
- 0.3.10
- 0.3.00
- 0.2.90
- 0.2.80
- 0.2.70
- 0.2.60
- 0.2.50
- 0.2.40
- 0.2.30
- 0.2.20
- 0.2.10
- 0.2.00
- 0.1.90
- 0.1.80
- 0.1.70
- 0.1.60
- 0.1.50
- 0.1.40
- 0.1.30
- 0.1.20
- 0.1.10
- 0.1.00
- 0.0.90
- 0.0.80
- 0.0.70
- 0.0.60
- 0.0.50
- 0.0.40
- 0.0.30
- 0.0.20
- 0.0.10
Package Sidebar
Install
npm i ztapputils
Weekly Downloads
7
Version
1.3.42
License
MIT
Unpacked Size
123 kB
Total Files
39