mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-21 03:19:19 +08:00
chore: 优化 eslint 与 prettier 配合使用
This commit is contained in:
parent
8084bf05ac
commit
1da0c6ca6b
@ -15,12 +15,12 @@ module.exports = {
|
||||
ecmaVersion: 2020
|
||||
},
|
||||
extends: [
|
||||
'plugin:prettier/recommended', // 添加 prettier 插件
|
||||
'plugin:vue/vue3-recommended',
|
||||
'plugin:vue/vue3-strongly-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'@vue/standard',
|
||||
'@vue/typescript/recommended'
|
||||
'@vue/typescript/recommended',
|
||||
'plugin:prettier/recommended' // 添加 prettier 插件,必须放在数组最后
|
||||
],
|
||||
rules: {
|
||||
'vue/multi-word-component-names': 'off',
|
||||
|
@ -8,7 +8,9 @@
|
||||
"build:prod": "vue-tsc --noEmit && vite build",
|
||||
"preview:stage": "pnpm build:stage && vite preview",
|
||||
"preview:prod": "pnpm build:prod && vite preview",
|
||||
"lint": "eslint \"{src,mock}/**/*.{vue,ts,tsx}\" --fix"
|
||||
"lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
|
||||
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
|
||||
"lint": "pnpm lint:eslint && pnpm lint:prettier"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^1.1.4",
|
||||
|
Loading…
x
Reference in New Issue
Block a user