Prechádzať zdrojové kódy

chore: 升级代码规范风格相关库至最新 (#736)

xiaoming 1 rok pred
rodič
commit
4415f12025

+ 4 - 0
.browserslistrc

@@ -0,0 +1,4 @@
+> 1%
+last 2 versions
+not dead
+not ie 11

+ 3 - 1
.husky/commit-msg

@@ -3,4 +3,6 @@
 # shellcheck source=./_/husky.sh
 . "$(dirname "$0")/_/husky.sh"
 
-npx --no-install commitlint --edit "$1"
+PATH="/usr/local/bin:$PATH"
+
+npx --no-install commitlint --edit "$1"

+ 0 - 8
.husky/lintstagedrc.js

@@ -1,8 +0,0 @@
-module.exports = {
-  "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
-  "{!(package)*.json}": ["prettier --write--parser json"],
-  "package.json": ["prettier --write"],
-  "*.vue": ["eslint --fix", "prettier --write", "stylelint --fix"],
-  "*.{vue,css,scss,postcss,less}": ["stylelint --fix", "prettier --write"],
-  "*.md": ["prettier --write"]
-};

+ 3 - 3
.husky/pre-commit

@@ -4,7 +4,7 @@
 
 [ -n "$CI" ] && exit 0
 
-# Format and submit code according to lintstagedrc.js configuration
-npm run lint:lint-staged
+PATH="/usr/local/bin:$PATH"
 
-npm run lint:pretty
+# Perform lint check on files in the staging area through .lintstagedrc configuration
+pnpm exec lint-staged

+ 16 - 0
.lintstagedrc

@@ -0,0 +1,16 @@
+{
+  "*.{js,jsx,ts,tsx}": [
+    "prettier --cache --ignore-unknown  --write",
+    "eslint --cache --fix"
+  ],
+  "{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
+    "prettier --cache --write--parser json"
+  ],
+  "package.json": ["prettier --cache --write"],
+  "*.vue": ["prettier --write", "eslint --cache --fix", "stylelint --fix"],
+  "*.{css,scss,html}": [
+    "prettier --cache --ignore-unknown --write",
+    "stylelint --fix"
+  ],
+  "*.md": ["prettier --cache --ignore-unknown --write"]
+}

+ 41 - 28
package.json

@@ -2,6 +2,30 @@
   "name": "vue-pure-admin",
   "version": "4.5.0",
   "private": true,
+  "keywords": [
+    "vue-pure-admin",
+    "element-plus",
+    "tailwindcss",
+    "pure-admin",
+    "typescript",
+    "pinia",
+    "vue3",
+    "vite"
+  ],
+  "homepage": "https://github.com/pure-admin/vue-pure-admin",
+  "bugs": {
+    "url": "https://github.com/pure-admin/vue-pure-admin/issues"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/pure-admin/vue-pure-admin.git"
+  },
+  "license": "MIT",
+  "author": {
+    "name": "xiaoxian521",
+    "email": "pureadmin@163.com",
+    "url": "https://github.com/xiaoxian521"
+  },
   "scripts": {
     "dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
     "serve": "pnpm dev",
@@ -13,21 +37,14 @@
     "typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
     "svgo": "svgo -f src/assets/svg -o src/assets/svg",
     "cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
-    "clean:cache": "rimraf node_modules && rimraf .eslintcache && pnpm install",
+    "clean:cache": "rimraf .eslintcache && rimraf node_modules && pnpm install",
     "lint:eslint": "eslint --cache --max-warnings 0  \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
     "lint:prettier": "prettier --write  \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
     "lint:stylelint": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
-    "lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
-    "lint:pretty": "pretty-quick --staged",
     "lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
     "prepare": "husky install",
     "preinstall": "npx only-allow pnpm"
   },
-  "browserslist": [
-    "> 1%",
-    "not ie 11",
-    "not op_mini all"
-  ],
   "dependencies": {
     "@amap/amap-jsapi-loader": "^1.0.1",
     "@howdyjs/mouse-menu": "^2.0.9",
@@ -44,7 +61,7 @@
     "animate.css": "^4.1.1",
     "axios": "^1.5.0",
     "china-area-data": "^5.0.1",
-    "cropperjs": "^1.6.0",
+    "cropperjs": "^1.6.1",
     "dayjs": "^1.11.9",
     "echarts": "^5.4.3",
     "el-table-infinite-scroll": "^3.0.1",
@@ -90,7 +107,7 @@
     "@iconify-icons/ep": "^1.2.12",
     "@iconify-icons/ri": "^1.2.10",
     "@iconify/vue": "^4.1.1",
-    "@intlify/unplugin-vue-i18n": "^0.11.0",
+    "@intlify/unplugin-vue-i18n": "^1.2.0",
     "@pureadmin/theme": "^3.1.0",
     "@types/intro.js": "^5.1.1",
     "@types/js-cookie": "^3.0.4",
@@ -100,27 +117,26 @@
     "@types/qrcode": "^1.5.2",
     "@types/qs": "^6.9.8",
     "@types/sortablejs": "^1.15.2",
-    "@typescript-eslint/eslint-plugin": "^5.62.0",
-    "@typescript-eslint/parser": "^5.62.0",
+    "@typescript-eslint/eslint-plugin": "^6.7.0",
+    "@typescript-eslint/parser": "^6.7.0",
     "@vitejs/plugin-vue": "^4.3.4",
     "@vitejs/plugin-vue-jsx": "^3.0.2",
-    "@vue/eslint-config-prettier": "^7.1.0",
-    "@vue/eslint-config-typescript": "^11.0.3",
+    "@vue/eslint-config-prettier": "^8.0.0",
+    "@vue/eslint-config-typescript": "^12.0.0",
     "autoprefixer": "^10.4.15",
     "cloc": "^2.11.0",
     "cssnano": "^6.0.1",
     "eslint": "^8.49.0",
-    "eslint-plugin-prettier": "^4.2.1",
+    "eslint-plugin-prettier": "^5.0.0",
     "eslint-plugin-vue": "^9.17.0",
     "husky": "^8.0.3",
-    "lint-staged": "^13.3.0",
+    "lint-staged": "^14.0.1",
     "picocolors": "^1.0.0",
     "postcss": "^8.4.29",
     "postcss-html": "^1.5.0",
     "postcss-import": "^15.1.0",
     "postcss-scss": "^4.0.8",
-    "prettier": "^2.8.8",
-    "pretty-quick": "^3.1.3",
+    "prettier": "^3.0.3",
     "rimraf": "^5.0.1",
     "rollup-plugin-visualizer": "^5.9.2",
     "sass": "^1.67.0",
@@ -128,18 +144,18 @@
     "stylelint": "^15.10.3",
     "stylelint-config-html": "^1.1.0",
     "stylelint-config-recess-order": "^4.3.0",
-    "stylelint-config-recommended": "^12.0.0",
-    "stylelint-config-recommended-scss": "^12.0.0",
+    "stylelint-config-recommended": "^13.0.0",
+    "stylelint-config-recommended-scss": "^13.0.0",
     "stylelint-config-recommended-vue": "^1.5.0",
-    "stylelint-config-standard": "^33.0.0",
-    "stylelint-config-standard-scss": "^9.0.0",
+    "stylelint-config-standard": "^34.0.0",
+    "stylelint-config-standard-scss": "^11.0.0",
     "stylelint-order": "^6.0.3",
-    "stylelint-prettier": "^3.0.0",
+    "stylelint-prettier": "^4.0.2",
     "stylelint-scss": "^5.2.1",
     "svgo": "^3.0.2",
     "tailwindcss": "^3.3.3",
     "terser": "^5.19.4",
-    "typescript": "5.0.4",
+    "typescript": "^5.2.2",
     "vite": "^4.4.9",
     "vite-plugin-cdn-import": "^0.3.5",
     "vite-plugin-compression": "^0.5.1",
@@ -162,8 +178,5 @@
       "w3c-hr-time": "*",
       "stable": "*"
     }
-  },
-  "repository": "git@github.com:pure-admin/vue-pure-admin.git",
-  "author": "xiaoxian521",
-  "license": "MIT"
+  }
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 318 - 481
pnpm-lock.yaml


+ 2 - 1
src/assets/iconfont/iconfont.css

@@ -1,6 +1,7 @@
 @font-face {
   font-family: "iconfont"; /* Project id 2208059 */
-  src: url("iconfont.woff2?t=1671895108120") format("woff2"),
+  src:
+    url("iconfont.woff2?t=1671895108120") format("woff2"),
     url("iconfont.woff?t=1671895108120") format("woff"),
     url("iconfont.ttf?t=1671895108120") format("truetype");
 }

+ 2 - 1
src/components/ReCountTo/src/rebound/rebound.css

@@ -10,7 +10,8 @@
 }
 
 ul {
-  animation: move 0.3s linear infinite,
+  animation:
+    move 0.3s linear infinite,
     bounce-in-down 1s calc(var(--delay) * 1s) forwards;
 }
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 1
src/components/ReFlowChart/src/assets/iconfont/iconfont.css


+ 5 - 2
src/components/ReSegmented/src/index.css

@@ -28,9 +28,12 @@
   padding: 4px 0;
   background-color: #fff;
   border-radius: 4px;
-  box-shadow: 0 2px 8px -2px rgb(0 0 0 / 5%), 0 1px 4px -1px rgb(0 0 0 / 7%),
+  box-shadow:
+    0 2px 8px -2px rgb(0 0 0 / 5%),
+    0 1px 4px -1px rgb(0 0 0 / 7%),
     0 0 1px rgb(0 0 0 / 7%);
-  transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1),
+  transition:
+    transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1),
     width 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
   will-change: transform, width;
 }

+ 2 - 1
src/components/ReSplitPane/iconfont/iconfont.css

@@ -1,6 +1,7 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3268330 */
-  src: url("iconfont.woff2?t=1647939915215") format("woff2"),
+  src:
+    url("iconfont.woff2?t=1647939915215") format("woff2"),
     url("iconfont.woff?t=1647939915215") format("woff"),
     url("iconfont.ttf?t=1647939915215") format("truetype");
 }

+ 3 - 1
src/layout/components/search/components/SearchFooter.vue

@@ -50,7 +50,9 @@ const { device } = useNav();
     padding: 2px;
     margin-right: 3px;
     font-size: 20px;
-    box-shadow: inset 0 -2px #cdcde6, inset 0 0 1px 1px #fff,
+    box-shadow:
+      inset 0 -2px #cdcde6,
+      inset 0 0 1px 1px #fff,
       0 1px 2px 1px #1e235a66;
   }
 

+ 1 - 1
src/layout/frameView.vue

@@ -56,9 +56,9 @@ onMounted(() => {
 
 <style lang="scss" scoped>
 .frame {
-  z-index: 998;
   position: absolute;
   inset: 0;
+  z-index: 998;
 
   .frame-iframe {
     box-sizing: border-box;

+ 7 - 3
src/style/dark.scss

@@ -122,8 +122,10 @@ html.dark {
   .pure-message {
     background-color: rgb(36 37 37) !important;
     background-image: initial !important;
-    box-shadow: rgb(13 13 13 / 12%) 0 3px 6px -4px,
-      rgb(13 13 13 / 8%) 0 6px 16px 0, rgb(13 13 13 / 5%) 0 9px 28px 8px !important;
+    box-shadow:
+      rgb(13 13 13 / 12%) 0 3px 6px -4px,
+      rgb(13 13 13 / 8%) 0 6px 16px 0,
+      rgb(13 13 13 / 5%) 0 9px 28px 8px !important;
 
     & .el-message__content {
       color: $color-white !important;
@@ -142,7 +144,9 @@ html.dark {
   /* 自定义菜单搜索样式 */
   .pure-search-dialog {
     .el-dialog__footer {
-      box-shadow: 0 -1px 0 0 #555a64, 0 -3px 6px 0 rgb(69 98 155 / 12%);
+      box-shadow:
+        0 -1px 0 0 #555a64,
+        0 -3px 6px 0 rgb(69 98 155 / 12%);
     }
 
     .search-footer {

+ 14 - 5
src/style/element-plus.scss

@@ -63,7 +63,8 @@
   }
 
   & .peg {
-    box-shadow: 0 0 10px var(--el-color-primary),
+    box-shadow:
+      0 0 10px var(--el-color-primary),
       0 0 5px var(--el-color-primary) !important;
   }
 
@@ -105,7 +106,9 @@
     height: 24px;
     border-radius: 4px;
     outline: none;
-    transition: background-color 0.2s, color 0.2s;
+    transition:
+      background-color 0.2s,
+      color 0.2s;
 
     &:hover {
       color: rgb(0 0 0 / 88%) !important;
@@ -124,7 +127,9 @@
   padding: 10px 13px !important;
   background: #fff !important;
   border-width: 0 !important;
-  box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014,
+  box-shadow:
+    0 3px 6px -4px #0000001f,
+    0 6px 16px #00000014,
     0 9px 28px 8px #0000000d !important;
 
   &.el-message.is-closable .el-message__content {
@@ -145,7 +150,9 @@
     right: 9px !important;
     border-radius: 4px;
     outline: none;
-    transition: background-color 0.2s, color 0.2s;
+    transition:
+      background-color 0.2s,
+      color 0.2s;
 
     &:hover {
       background-color: rgb(0 0 0 / 6%);
@@ -170,6 +177,8 @@
 
   .el-dialog__footer {
     padding-bottom: 10px;
-    box-shadow: 0 -1px 0 0 #e0e3e8, 0 -3px 6px 0 rgb(69 98 155 / 12%);
+    box-shadow:
+      0 -1px 0 0 #e0e3e8,
+      0 -3px 6px 0 rgb(69 98 155 / 12%);
   }
 }

+ 4 - 1
src/style/login.css

@@ -44,7 +44,10 @@
   text-transform: uppercase;
   margin: 15px 0;
   color: #999;
-  font: bold 200% Consolas, Monaco, monospace;
+  font:
+    bold 200% Consolas,
+    Monaco,
+    monospace;
 }
 
 @media screen and (max-width: 1180px) {

+ 1 - 1
src/views/components/json-editor/index.vue

@@ -107,7 +107,7 @@ watch(
       :show-icon="state.showIcon"
       :show-line-number="state.showLineNumber"
       :editable="state.editable"
-      :editable-trigger="(state.editableTrigger as any)"
+      :editable-trigger="state.editableTrigger as any"
     />
   </el-card>
 </template>

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov