chore(styles): 为项目添加开发依赖
- 添加Prettier、ESLint用于规范代码风格 - 添加Prettier配置文件
This commit is contained in:
@ -25,7 +25,6 @@
|
|||||||
"@vueuse/nuxt": "^13.6.0",
|
"@vueuse/nuxt": "^13.6.0",
|
||||||
"dompurify": "^3.2.6",
|
"dompurify": "^3.2.6",
|
||||||
"element-plus": "^2.10.7",
|
"element-plus": "^2.10.7",
|
||||||
"eslint": "^9.0.0",
|
|
||||||
"markdown-it": "^14.1.0",
|
"markdown-it": "^14.1.0",
|
||||||
"meilisearch": "^0.53.0",
|
"meilisearch": "^0.53.0",
|
||||||
"nuxt": "^4.0.3",
|
"nuxt": "^4.0.3",
|
||||||
@ -38,6 +37,8 @@
|
|||||||
"@commitlint/cli": "^19.8.1",
|
"@commitlint/cli": "^19.8.1",
|
||||||
"@commitlint/config-conventional": "^19.8.1",
|
"@commitlint/config-conventional": "^19.8.1",
|
||||||
"@element-plus/nuxt": "^1.1.4",
|
"@element-plus/nuxt": "^1.1.4",
|
||||||
"husky": "^9.1.7"
|
"eslint": "^9.35.0",
|
||||||
|
"husky": "^9.1.7",
|
||||||
|
"prettier": "^3.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
pnpm-lock.yaml
generated
16
pnpm-lock.yaml
generated
@ -50,9 +50,6 @@ importers:
|
|||||||
element-plus:
|
element-plus:
|
||||||
specifier: ^2.10.7
|
specifier: ^2.10.7
|
||||||
version: 2.11.2(vue@3.5.21(typescript@5.9.2))
|
version: 2.11.2(vue@3.5.21(typescript@5.9.2))
|
||||||
eslint:
|
|
||||||
specifier: ^9.0.0
|
|
||||||
version: 9.35.0(jiti@2.5.1)
|
|
||||||
markdown-it:
|
markdown-it:
|
||||||
specifier: ^14.1.0
|
specifier: ^14.1.0
|
||||||
version: 14.1.0
|
version: 14.1.0
|
||||||
@ -84,9 +81,15 @@ importers:
|
|||||||
'@element-plus/nuxt':
|
'@element-plus/nuxt':
|
||||||
specifier: ^1.1.4
|
specifier: ^1.1.4
|
||||||
version: 1.1.4(@element-plus/icons-vue@2.3.2(vue@3.5.21(typescript@5.9.2)))(element-plus@2.11.2(vue@3.5.21(typescript@5.9.2)))(magicast@0.3.5)
|
version: 1.1.4(@element-plus/icons-vue@2.3.2(vue@3.5.21(typescript@5.9.2)))(element-plus@2.11.2(vue@3.5.21(typescript@5.9.2)))(magicast@0.3.5)
|
||||||
|
eslint:
|
||||||
|
specifier: ^9.35.0
|
||||||
|
version: 9.35.0(jiti@2.5.1)
|
||||||
husky:
|
husky:
|
||||||
specifier: ^9.1.7
|
specifier: ^9.1.7
|
||||||
version: 9.1.7
|
version: 9.1.7
|
||||||
|
prettier:
|
||||||
|
specifier: ^3.6.2
|
||||||
|
version: 3.6.2
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@ -4455,6 +4458,11 @@ packages:
|
|||||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
|
|
||||||
|
prettier@3.6.2:
|
||||||
|
resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==}
|
||||||
|
engines: {node: '>=14'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
pretty-bytes@7.0.1:
|
pretty-bytes@7.0.1:
|
||||||
resolution: {integrity: sha512-285/jRCYIbMGDciDdrw0KPNC4LKEEwz/bwErcYNxSJOi4CpGUuLpb9gQpg3XJP0XYj9ldSRluXxih4lX2YN8Xw==}
|
resolution: {integrity: sha512-285/jRCYIbMGDciDdrw0KPNC4LKEEwz/bwErcYNxSJOi4CpGUuLpb9gQpg3XJP0XYj9ldSRluXxih4lX2YN8Xw==}
|
||||||
engines: {node: '>=20'}
|
engines: {node: '>=20'}
|
||||||
@ -10469,6 +10477,8 @@ snapshots:
|
|||||||
|
|
||||||
prelude-ls@1.2.1: {}
|
prelude-ls@1.2.1: {}
|
||||||
|
|
||||||
|
prettier@3.6.2: {}
|
||||||
|
|
||||||
pretty-bytes@7.0.1: {}
|
pretty-bytes@7.0.1: {}
|
||||||
|
|
||||||
process-nextick-args@2.0.1: {}
|
process-nextick-args@2.0.1: {}
|
||||||
|
|||||||
30
prettier.config.mjs
Normal file
30
prettier.config.mjs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/**
|
||||||
|
* @see https://prettier.io/docs/en/configuration.html
|
||||||
|
* @type {import("prettier").Config}
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
// 打印宽度
|
||||||
|
"printWidth": 80,
|
||||||
|
// 缩进空格数
|
||||||
|
"tabWidth": 2,
|
||||||
|
// 使用制表符而不是空格缩进
|
||||||
|
"useTabs": false,
|
||||||
|
// 句尾添加分号
|
||||||
|
"semi": true,
|
||||||
|
// 使用单引号
|
||||||
|
"singleQuote": true,
|
||||||
|
// 尾随逗号
|
||||||
|
"trailingComma": "es5",
|
||||||
|
// 对象大括号内的空格
|
||||||
|
"bracketSpacing": true,
|
||||||
|
// 箭头函数参数括号
|
||||||
|
"arrowParens": "always",
|
||||||
|
// 括号行位置
|
||||||
|
"bracketSameLine": true,
|
||||||
|
// 换行符使用 lf
|
||||||
|
"endOfLine": "lf",
|
||||||
|
// HTML 空格敏感度
|
||||||
|
"htmlWhitespaceSensitivity": "css",
|
||||||
|
// Vue 文件脚本和样式缩进
|
||||||
|
"vueIndentScriptAndStyle": true,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user