File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 22
33🔧 一个 Vue 的 ESLint 配置,使用 Prettier 格式化代码。
44
5+ > 如果只需要对 TypeScript 的代码进行格式化,可以使用 [ @longwoo/eslint-config-typescript-prettier ] ( https://github.com/long-woo/eslint-config-typescript-prettier ) 。
6+
57## 使用
68
791.安装依赖
810
911``` sh
10- pnpm add -D eslint @longwoo/eslint-config-vue
12+ pnpm add -D @longwoo/eslint-config-vue
1113
1214# or
13- yarn add -D eslint @longwoo/eslint-config-vue
15+ yarn add -D @longwoo/eslint-config-vue
1416
1517# or
1618npm install --save-dev @longwoo/eslint-config-vue
@@ -20,7 +22,7 @@ npm install --save-dev @longwoo/eslint-config-vue
2022
2123``` json
2224{
23- "extends" : " @longwoo/eslint-config- vue"
25+ "extends" : " @longwoo/vue"
2426}
2527```
2628
Original file line number Diff line number Diff line change 1- /* eslint-env node */
21module . exports = {
3- root : true ,
42 env : {
53 'vue/setup-compiler-macros' : true
64 } ,
75 extends : [
8- 'plugin:vue/vue3-essential' ,
96 'eslint:recommended' ,
10- '@vue/eslint-config-typescript/recommended' ,
11- '@vue/prettier'
7+ 'plugin:vue/vue3-essential' ,
8+ '@vue/typescript/recommended' ,
9+ '@vue/prettier'
1210 ]
1311} ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @longwoo/eslint-config-vue" ,
33 "version" : " 1.0.0" ,
4- "description" : " Vue eslint 配置 " ,
4+ "description" : " 一个 Vue 的 ESLint 配置,使用 Prettier 格式化代码。 " ,
55 "main" : " index.js" ,
66 "keywords" : [
77 " eslint" ,
88 " eslint-config" ,
99 " eslint-config-vue"
1010 ],
11- "author" : " long.woo" ,
11+ "author" : {
12+ "name" : " long.woo" ,
13+ "email" : " longwunet@outlook.com"
14+ },
15+ "publishConfig" : {
16+ "access" : " public" ,
17+ "registry" : " https://registry.npmjs.org/"
18+ },
1219 "license" : " ISC" ,
1320 "dependencies" : {
1421 "@vue/eslint-config-prettier" : " ^7.0.0" ,
You can’t perform that action at this time.
0 commit comments