ci(project): modify deps

This commit is contained in:
Coffee-crocodile 2023-05-24 13:31:27 +08:00
parent 34371ded9d
commit 54cc857394
9 changed files with 38 additions and 109 deletions

View File

@ -1,65 +1,3 @@
module.exports = {
extends: '@antfu',
// //https://eslint.org/docs/latest/
// root: true,
// // 环境变量 https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-environments
// env: {
// browser: true, //浏览器全局变量。
// node: true, // Node.js 全局变量和 Node.js 范围。
// es2021: true, // 所有的ECMAScript6的特性除了模块
// },
// // 全局变量
// globals: {},
// // 指定解析器与解析器配置
// parser: 'vue-eslint-parser',
// parserOptions: {
// ecmaVersion: 12,
// parser: '@typescript-eslint/parser',
// sourceType: 'module',
// },
// // 想要Linting规则的插件 https://eslint.org/docs/latest/user-guide/configuring/plugins
// plugins: ['vue', '@typescript-eslint'],
// // 指定扩展的配置,配置支持递归扩展,支持规则的覆盖和聚合。
// extends: [
// 'eslint:recommended',
// 'plugin:vue/vue3-recommended',
// '@vue/eslint-config-typescript/recommended',
// '@vue/typescript/recommended',
// ],
// overrides: [
// {
// files: ['*.vue'],
// parser: 'vue-eslint-parser',
// parserOptions: {
// parser: '@typescript-eslint/parser'
// },
// rules: {
// 'no-undef': 'off'
// }
// },
// {
// files: ['*.html'],
// rules: {
// 'vue/comment-directive': 'off'
// }
// }
// ],
// rules: {
// // TSESLint docs https://typescript-eslint.io/rules/
// 'no-var': 'error', // 禁止使用var
// 'no-unused-vars': 'off', // 允许声明不使用的值
// 'no-console': 'off', // 允许出现console
// 'no-debugger': 'off', // 关闭debugger警告
// 'vue/multi-word-component-names': 0, // 关闭文件名多单词
// // 'import/no-unresolved': ['error', { ignore: ['~icons/*'] }],
// "@typescript-eslint/no-explicit-any": ["off"], // 允许使用any
// "@typescript-eslint/no-empty-function": 'off', // 允许空函数
// '@typescript-eslint/no-empty-interface': [
// 'error',
// {
// allowSingleExtends: true
// }
// ],
// },
extends: '@chansee97/eslint-config-vue',
}

View File

@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx --no-install commitlint --edit "$1"

View File

@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged

View File

@ -1,7 +1,7 @@
{
"editor.tabSize": 2,
"editor.formatOnSave": false,
"eslint.format.enable": false,
"eslint.format.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},

View File

@ -1 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] }
module.exports = { extends: ['@chansee97/commitlint-config'] }

View File

@ -3,9 +3,9 @@
"version": "0.0.1",
"private": true,
"description": "",
"author": "iam-see <chen.dev@foxmail.com> (https://github.com/iam-see/)",
"author": "iam-see <chen.dev@foxmail.com> (https://github.com/chansee97/)",
"license": "MIT",
"homepage": "https://github.com/iam-see/Ench-admin",
"homepage": "https://github.com/chansee97/Ench-admin",
"keywords": [
"Vue",
"Vue3",
@ -18,7 +18,7 @@
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"lint": "eslint . --fix",
"prepare": "husky install",
"prepare": "npx simple-git-hooks",
"commit": "cz",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
},
@ -28,62 +28,62 @@
}
},
"dependencies": {
"@vueuse/core": "^9.13.0",
"@vueuse/core": "^10.1.2",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"axios": "^1.3.4",
"axios": "^1.4.0",
"crypto-js": "^4.1.1",
"echarts": "^5.4.1",
"md-editor-v3": "^2.9.3",
"pinia": "^2.0.33",
"pinia": "^2.1.3",
"pinia-plugin-persist": "^1.0.0",
"qs": "^6.11.1",
"vue": "^3.2.47",
"vue": "^3.3.4",
"vue-qr": "^4.0.9",
"vue-router": "^4.1.6"
},
"devDependencies": {
"@antfu/eslint-config": "^0.37.0",
"@chansee97/commitlint-config": "^0.3.3",
"@chansee97/eslint-config-vue": "^0.3.3",
"@commitlint/cli": "^17.4.1",
"@commitlint/config-conventional": "^17.4.0",
"@iconify-json/icon-park-outline": "^1.1.9",
"@iconify/vue": "^4.0.2",
"@types/crypto-js": "^4.1.1",
"@types/mockjs": "^1.0.7",
"@types/node": "^18.15.3",
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@unocss/preset-attributify": "^0.50.4",
"@unocss/preset-uno": "^0.50.4",
"@unocss/vite": "^0.50.4",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vue/eslint-config-typescript": "^11.0.2",
"commitizen": "^4.2.6",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^7.0.0",
"eslint": "^8.36.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-vue": "^9.9.0",
"husky": "^8.0.3",
"less": "^4.1.3",
"lint-staged": "^13.1.0",
"mockjs": "^1.1.0",
"naive-ui": "^2.34.3",
"naive-ui": "^2.34.4",
"rollup-plugin-visualizer": "^5.9.0",
"typescript": "^5.0.2",
"simple-git-hooks": "^2.8.1",
"typescript": "^5.0.4",
"unplugin-icons": "^0.15.3",
"unplugin-vue-components": "^0.24.1",
"vite": "^4.2.1",
"vite": "^4.3.8",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-vue-setup-extend": "^0.4.0",
"vue-tsc": "^1.2.0"
"vue-tsc": "^1.6.5"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged",
"commit-msg": "pnpm commitlint -e"
},
"lint-staged": {
"*.{vue,js,jsx,ts,tsx,json}": "eslint --fix"
"*.{js,jsx,,mjs,ts,tsx,json,,md,yml}": [
"eslint --fix"
]
}
}

View File

@ -20,8 +20,7 @@ const themeOverrides: GlobalThemeOverrides = {}
:theme="appStore.darkTheme"
:locale="locale"
:date-locale="dateLocale"
:theme-overrides="themeOverrides"
>
:theme-overrides="themeOverrides">
<naive-provider><router-view /></naive-provider>
</n-config-provider>
</template>

View File

@ -1,9 +1,9 @@
import type { Router } from 'vue-router'
import { createPermissionGuard } from './permission'
import { useAppInfo } from '@/hooks'
import { useRouteStore, useTabStore } from '@/store'
const { title } = useAppInfo()
const title = import.meta.env.VITE_APP_TITLE
export function setupRouterGuard(router: Router) {
router.beforeEach(async (to, from, next) => {

View File

@ -2,7 +2,7 @@ import { resolve } from 'node:path'
import type { ConfigEnv } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import { createViteProxy, setVitePlugins } from './build'
import { proxyConfig } from '@/config'
import { proxyConfig } from './src/config'
// 当前执行node命令时文件夹的地址工作目录
const rootPath: string = resolve(process.cwd())