build(projects): 升级依赖,添加对json的eslint检测及格式化
This commit is contained in:
parent
d9cfeabb47
commit
711a4ae34f
@ -11,6 +11,5 @@ lib
|
|||||||
/docs
|
/docs
|
||||||
.vscode
|
.vscode
|
||||||
.local
|
.local
|
||||||
package.json
|
|
||||||
!.env-config.ts
|
!.env-config.ts
|
||||||
components.d.ts
|
components.d.ts
|
||||||
|
@ -38,6 +38,12 @@ module.exports = {
|
|||||||
rules: {
|
rules: {
|
||||||
'vue/comment-directive': 'off'
|
'vue/comment-directive': 'off'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['*.json'],
|
||||||
|
rules: {
|
||||||
|
'no-unused-expressions': 'off'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
|
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@ -9,6 +9,8 @@
|
|||||||
"strings": true
|
"strings": true
|
||||||
},
|
},
|
||||||
"editor.tabSize": 2,
|
"editor.tabSize": 2,
|
||||||
|
"eslint.alwaysShowStatus": true,
|
||||||
|
"eslint.validate": ["javascript", "javascriptreact", "vue", "typescript", "typescriptreact", "html", "json", "jsonc"],
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.env.*": "dotenv"
|
"*.env.*": "dotenv"
|
||||||
},
|
},
|
||||||
@ -48,10 +50,10 @@
|
|||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[json]": {
|
"[json]": {
|
||||||
"editor.defaultFormatter": "vscode.json-language-features"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[jsonc]": {
|
"[jsonc]": {
|
||||||
"editor.defaultFormatter": "vscode.json-language-features"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[javascript]": {
|
"[javascript]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
16
package.json
16
package.json
@ -16,14 +16,14 @@
|
|||||||
"build:vercel": "cross-env VITE_HASH_ROUTE=1 VITE_VERCEL=1 vite build",
|
"build:vercel": "cross-env VITE_HASH_ROUTE=1 VITE_VERCEL=1 vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"typecheck": "vue-tsc --noEmit --skipLibCheck",
|
"typecheck": "vue-tsc --noEmit --skipLibCheck",
|
||||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.json --fix",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"postinstall": "patch-package",
|
"postinstall": "patch-package",
|
||||||
"release": "standard-version",
|
"release": "standard-version",
|
||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{vue,js,jsx,ts,tsx}": "eslint --fix"
|
"*.{vue,js,jsx,ts,tsx,json}": "eslint --fix"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"commitizen": {
|
"commitizen": {
|
||||||
@ -46,10 +46,10 @@
|
|||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"naive-ui": "^2.31.0",
|
"naive-ui": "^2.31.0",
|
||||||
"pinia": "^2.0.15",
|
"pinia": "^2.0.16",
|
||||||
"print-js": "^1.6.0",
|
"print-js": "^1.6.0",
|
||||||
"qs": "^6.11.0",
|
"qs": "^6.11.0",
|
||||||
"swiper": "^8.3.0",
|
"swiper": "^8.3.1",
|
||||||
"ua-parser-js": "^1.0.2",
|
"ua-parser-js": "^1.0.2",
|
||||||
"vditor": "^3.8.15",
|
"vditor": "^3.8.15",
|
||||||
"vue": "3.2.37",
|
"vue": "3.2.37",
|
||||||
@ -61,7 +61,7 @@
|
|||||||
"@amap/amap-jsapi-types": "^0.0.8",
|
"@amap/amap-jsapi-types": "^0.0.8",
|
||||||
"@commitlint/cli": "^17.0.3",
|
"@commitlint/cli": "^17.0.3",
|
||||||
"@commitlint/config-conventional": "^17.0.3",
|
"@commitlint/config-conventional": "^17.0.3",
|
||||||
"@iconify/json": "^2.1.76",
|
"@iconify/json": "^2.1.77",
|
||||||
"@iconify/vue": "^3.2.1",
|
"@iconify/vue": "^3.2.1",
|
||||||
"@types/bmapgl": "^0.0.5",
|
"@types/bmapgl": "^0.0.5",
|
||||||
"@types/crypto-js": "^4.1.1",
|
"@types/crypto-js": "^4.1.1",
|
||||||
@ -70,8 +70,8 @@
|
|||||||
"@types/ua-parser-js": "^0.7.36",
|
"@types/ua-parser-js": "^0.7.36",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
||||||
"@typescript-eslint/parser": "^5.30.6",
|
"@typescript-eslint/parser": "^5.30.6",
|
||||||
"@vitejs/plugin-vue": "^2.3.3",
|
"@vitejs/plugin-vue": "^3.0.0",
|
||||||
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
||||||
"@vue/eslint-config-prettier": "^7.0.0",
|
"@vue/eslint-config-prettier": "^7.0.0",
|
||||||
"@vue/eslint-config-typescript": "^11.0.0",
|
"@vue/eslint-config-typescript": "^11.0.0",
|
||||||
"commitizen": "^4.2.4",
|
"commitizen": "^4.2.4",
|
||||||
@ -99,7 +99,7 @@
|
|||||||
"unplugin-icons": "^0.14.7",
|
"unplugin-icons": "^0.14.7",
|
||||||
"unplugin-vue-components": "0.21.1",
|
"unplugin-vue-components": "0.21.1",
|
||||||
"unplugin-vue-define-options": "^0.6.2",
|
"unplugin-vue-define-options": "^0.6.2",
|
||||||
"vite": "^2.9.14",
|
"vite": "^3.0.0",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vite-plugin-html": "^3.2.0",
|
"vite-plugin-html": "^3.2.0",
|
||||||
"vite-plugin-mock": "^2.9.6",
|
"vite-plugin-mock": "^2.9.6",
|
||||||
|
@ -2,7 +2,7 @@ import type { Component } from 'vue';
|
|||||||
|
|
||||||
type ViewComponent = Record<string, () => Promise<Component>>;
|
type ViewComponent = Record<string, () => Promise<Component>>;
|
||||||
|
|
||||||
const importViews = import.meta.glob('./**/index.vue');
|
const importViews = import.meta.glob('./**/index.vue') as ViewComponent;
|
||||||
|
|
||||||
const COMPONENTS_KEY = 'components';
|
const COMPONENTS_KEY = 'components';
|
||||||
const PREFIX = './';
|
const PREFIX = './';
|
||||||
|
@ -16,12 +16,7 @@
|
|||||||
"~/*": ["./*"],
|
"~/*": ["./*"],
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
},
|
},
|
||||||
"types": [
|
"types": ["vite/client", "node", "unplugin-icons/types/vue", "naive-ui/volar"]
|
||||||
"vite/client",
|
|
||||||
"node",
|
|
||||||
"unplugin-icons/types/vue",
|
|
||||||
"naive-ui/volar"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "dist"]
|
"exclude": ["node_modules", "dist"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user