提交 4009243e 作者: 方治民

feat: 升级依赖,增加 lint script,修复 eslint/stylelint 问题

上级 77ee9fdd
...@@ -68,5 +68,6 @@ module.exports = { ...@@ -68,5 +68,6 @@ module.exports = {
}, },
], ],
'vue/multi-word-component-names': 'off', 'vue/multi-word-component-names': 'off',
'vue/no-reserved-component-names': 'off',
}, },
} }
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
"log": "conventional-changelog -p angular -i CHANGELOG.md -s", "log": "conventional-changelog -p angular -i CHANGELOG.md -s",
"clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite", "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
"clean:lib": "rimraf node_modules", "clean:lib": "rimraf node_modules",
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", "lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
...@@ -54,16 +55,16 @@ ...@@ -54,16 +55,16 @@
"@ant-design/colors": "^6.0.0", "@ant-design/colors": "^6.0.0",
"@ant-design/icons-vue": "^6.1.0", "@ant-design/icons-vue": "^6.1.0",
"@iconify/iconify": "^2.2.1", "@iconify/iconify": "^2.2.1",
"@logicflow/core": "^1.1.15", "@logicflow/core": "^1.1.18",
"@logicflow/extension": "^1.1.15", "@logicflow/extension": "^1.1.18",
"@vue/runtime-core": "^3.2.33", "@vue/runtime-core": "^3.2.36",
"@vue/shared": "^3.2.33", "@vue/shared": "^3.2.36",
"@vueuse/core": "^8.4.2", "@vueuse/core": "^8.5.0",
"@vueuse/shared": "^8.4.2", "@vueuse/shared": "^8.5.0",
"@zxcvbn-ts/core": "^2.0.1", "@zxcvbn-ts/core": "^2.0.1",
"ant-design-vue": "^3.2.3", "ant-design-vue": "^3.2.5",
"axios": "^0.26.1", "axios": "^0.26.1",
"codemirror": "^5.65.3", "codemirror": "^5.65.4",
"cropperjs": "^1.5.12", "cropperjs": "^1.5.12",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"dayjs": "^1.11.2", "dayjs": "^1.11.2",
...@@ -80,9 +81,9 @@ ...@@ -80,9 +81,9 @@
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"sortablejs": "^1.15.0", "sortablejs": "^1.15.0",
"tinymce": "^5.10.4", "tinymce": "^5.10.5",
"vditor": "^3.8.14", "vditor": "^3.8.15",
"vue": "^3.2.33", "vue": "^3.2.36",
"vue-i18n": "^9.1.10", "vue-i18n": "^9.1.10",
"vue-json-pretty": "^2.1.0", "vue-json-pretty": "^2.1.0",
"vue-router": "^4.0.15", "vue-router": "^4.0.15",
...@@ -90,9 +91,9 @@ ...@@ -90,9 +91,9 @@
"xlsx": "^0.18.5" "xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^16.2.4", "@commitlint/cli": "^17.0.1",
"@commitlint/config-conventional": "^16.2.4", "@commitlint/config-conventional": "^16.2.4",
"@iconify/json": "^2.1.43", "@iconify/json": "^2.1.50",
"@purge-icons/generated": "^0.8.1", "@purge-icons/generated": "^0.8.1",
"@types/codemirror": "^5.60.5", "@types/codemirror": "^5.60.5",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.1.1",
...@@ -101,29 +102,29 @@ ...@@ -101,29 +102,29 @@
"@types/intro.js": "^3.0.2", "@types/intro.js": "^3.0.2",
"@types/lodash-es": "^4.17.6", "@types/lodash-es": "^4.17.6",
"@types/mockjs": "^1.0.6", "@types/mockjs": "^1.0.6",
"@types/node": "^17.0.33", "@types/node": "^17.0.35",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.4.2", "@types/qrcode": "^1.4.2",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@types/showdown": "^1.9.4", "@types/showdown": "^1.9.4",
"@types/sortablejs": "^1.13.0", "@types/sortablejs": "^1.13.0",
"@typescript-eslint/eslint-plugin": "^5.23.0", "@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.23.0", "@typescript-eslint/parser": "^5.26.0",
"@vitejs/plugin-legacy": "^1.8.2", "@vitejs/plugin-legacy": "^1.8.2",
"@vitejs/plugin-vue": "^2.3.3", "@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10", "@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/compiler-sfc": "3.2.31", "@vue/compiler-sfc": "3.2.31",
"@vue/test-utils": "^2.0.0-rc.21", "@vue/test-utils": "^2.0.0",
"autoprefixer": "^10.4.7", "autoprefixer": "^10.4.7",
"commitizen": "^4.2.4", "commitizen": "^4.2.4",
"conventional-changelog-cli": "^2.2.2", "conventional-changelog-cli": "^2.2.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",
"dotenv": "^16.0.1", "dotenv": "^16.0.1",
"eslint": "^8.15.0", "eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.7.1", "eslint-plugin-vue": "^9.0.1",
"esno": "^0.14.1", "esno": "^0.14.1",
"fs-extra": "^10.1.0", "fs-extra": "^10.1.0",
"husky": "^7.0.4", "husky": "^7.0.4",
...@@ -133,27 +134,27 @@ ...@@ -133,27 +134,27 @@
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"pont-engine": "^1.3.1", "pont-engine": "^1.3.1",
"postcss": "^8.4.13", "postcss": "^8.4.14",
"postcss-html": "^1.4.1", "postcss-html": "^1.4.1",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.6.2", "prettier": "^2.6.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.73.0", "rollup": "^2.74.1",
"rollup-plugin-visualizer": "^5.6.0", "rollup-plugin-visualizer": "^5.6.0",
"sort-package-json": "^1.57.0", "sort-package-json": "^1.57.0",
"stylelint": "^14.8.2", "stylelint": "^14.8.5",
"stylelint-config-prettier": "^9.0.3", "stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^7.0.0", "stylelint-config-recommended": "^7.0.0",
"stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^25.0.0", "stylelint-config-standard": "^25.0.0",
"stylelint-order": "^5.0.0", "stylelint-order": "^5.0.0",
"ts-node": "^10.7.0", "ts-node": "^10.8.0",
"typescript": "^4.6.4", "typescript": "^4.7.2",
"unplugin-auto-import": "^0.7.1", "unplugin-auto-import": "^0.7.2",
"vite": "^2.9.9", "vite": "^2.9.9",
"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-mkcert": "^1.6.0", "vite-plugin-mkcert": "^1.6.4",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vite-plugin-optimize-persist": "^0.1.2", "vite-plugin-optimize-persist": "^0.1.2",
"vite-plugin-package-config": "^0.1.1", "vite-plugin-package-config": "^0.1.1",
...@@ -164,8 +165,8 @@ ...@@ -164,8 +165,8 @@
"vite-plugin-theme": "^0.8.6", "vite-plugin-theme": "^0.8.6",
"vite-plugin-vue-setup-extend": "^0.4.0", "vite-plugin-vue-setup-extend": "^0.4.0",
"vite-plugin-windicss": "^1.8.4", "vite-plugin-windicss": "^1.8.4",
"vue-eslint-parser": "^9.0.1", "vue-eslint-parser": "^9.0.2",
"vue-tsc": "^0.34.13" "vue-tsc": "^0.34.16"
}, },
"engines": { "engines": {
"node": "^12 || >=14" "node": "^12 || >=14"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
"description": "身份认证", "description": "身份认证",
"interfaces": [ "interfaces": [
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "登录", "description": "登录",
"name": "login", "name": "login",
"method": "post", "method": "post",
...@@ -91,9 +89,7 @@ ...@@ -91,9 +89,7 @@
"parameters": [] "parameters": []
}, },
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "注册", "description": "注册",
"name": "register", "name": "register",
"method": "post", "method": "post",
...@@ -405,10 +401,7 @@ ...@@ -405,10 +401,7 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": [ "enum": ["'ASC'", "'DESC'"],
"'ASC'",
"'DESC'"
],
"typeProperties": [] "typeProperties": []
} }
} }
...@@ -447,9 +440,7 @@ ...@@ -447,9 +440,7 @@
"description": "文件管理", "description": "文件管理",
"interfaces": [ "interfaces": [
{ {
"consumes": [ "consumes": ["multipart/form-data"],
"multipart/form-data"
],
"description": "文件上传", "description": "文件上传",
"name": "upload", "name": "upload",
"method": "post", "method": "post",
...@@ -498,9 +489,7 @@ ...@@ -498,9 +489,7 @@
"description": "权限管理", "description": "权限管理",
"interfaces": [ "interfaces": [
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "新增", "description": "新增",
"name": "add", "name": "add",
"method": "post", "method": "post",
...@@ -686,11 +675,7 @@ ...@@ -686,11 +675,7 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": [ "enum": ["'DIR'", "'MENU'", "'BUTTON'"],
"'DIR'",
"'MENU'",
"'BUTTON'"
],
"typeProperties": [] "typeProperties": []
} }
}, },
...@@ -712,9 +697,7 @@ ...@@ -712,9 +697,7 @@
] ]
}, },
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "删除", "description": "删除",
"name": "deleted", "name": "deleted",
"method": "post", "method": "post",
...@@ -799,9 +782,7 @@ ...@@ -799,9 +782,7 @@
] ]
}, },
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "修改", "description": "修改",
"name": "modify", "name": "modify",
"method": "post", "method": "post",
...@@ -1002,11 +983,7 @@ ...@@ -1002,11 +983,7 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": [ "enum": ["'DIR'", "'MENU'", "'BUTTON'"],
"'DIR'",
"'MENU'",
"'BUTTON'"
],
"typeProperties": [] "typeProperties": []
} }
}, },
...@@ -1118,19 +1095,14 @@ ...@@ -1118,19 +1095,14 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": [ "enum": ["'ASC'", "'DESC'"],
"'ASC'",
"'DESC'"
],
"typeProperties": [] "typeProperties": []
} }
} }
] ]
}, },
{ {
"consumes": [ "consumes": ["application/x-www-form-urlencoded"],
"application/x-www-form-urlencoded"
],
"description": "树结构查询", "description": "树结构查询",
"name": "tree", "name": "tree",
"method": "get", "method": "get",
...@@ -1189,9 +1161,7 @@ ...@@ -1189,9 +1161,7 @@
"description": "角色管理", "description": "角色管理",
"interfaces": [ "interfaces": [
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "新增", "description": "新增",
"name": "add", "name": "add",
"method": "post", "method": "post",
...@@ -1249,9 +1219,7 @@ ...@@ -1249,9 +1219,7 @@
] ]
}, },
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "分配权限", "description": "分配权限",
"name": "assign", "name": "assign",
"method": "post", "method": "post",
...@@ -1309,9 +1277,7 @@ ...@@ -1309,9 +1277,7 @@
] ]
}, },
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "删除", "description": "删除",
"name": "deleted", "name": "deleted",
"method": "post", "method": "post",
...@@ -1396,9 +1362,7 @@ ...@@ -1396,9 +1362,7 @@
] ]
}, },
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "修改", "description": "修改",
"name": "modify", "name": "modify",
"method": "post", "method": "post",
...@@ -1561,10 +1525,7 @@ ...@@ -1561,10 +1525,7 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": [ "enum": ["'ASC'", "'DESC'"],
"'ASC'",
"'DESC'"
],
"typeProperties": [] "typeProperties": []
} }
} }
...@@ -1711,9 +1672,7 @@ ...@@ -1711,9 +1672,7 @@
"parameters": [] "parameters": []
}, },
{ {
"consumes": [ "consumes": ["application/json"],
"application/json"
],
"description": "分配角色", "description": "分配角色",
"name": "assign", "name": "assign",
"method": "post", "method": "post",
...@@ -1861,10 +1820,7 @@ ...@@ -1861,10 +1820,7 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": [ "enum": ["'ASC'", "'DESC'"],
"'ASC'",
"'DESC'"
],
"typeProperties": [] "typeProperties": []
} }
} }
...@@ -2290,11 +2246,7 @@ ...@@ -2290,11 +2246,7 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": [ "enum": ["'DIR'", "'MENU'", "'BUTTON'"],
"'DIR'",
"'MENU'",
"'BUTTON'"
],
"typeProperties": [] "typeProperties": []
}, },
"name": "type", "name": "type",
......
import type { VNode, FunctionalComponent } from 'vue' import type { VNode, FunctionalComponent } from 'vue'
import { h } from 'vue' import { h } from 'vue'
import { isString } from '@vue/shared' import { isString } from '/@/utils/is'
import { Icon } from '/@/components/Icon' import { Icon } from '/@/components/Icon'
export const TreeIcon: FunctionalComponent = ({ icon }: { icon: VNode | string }) => { export const TreeIcon: FunctionalComponent = ({ icon }: { icon: VNode | string }) => {
......
// copy from element-plus // copy from element-plus
import { warn } from 'vue' import { warn } from 'vue'
import { isObject } from '@vue/shared' import { isObject } from './is'
import { fromPairs } from 'lodash-es' import { fromPairs } from 'lodash-es'
import type { ExtractPropTypes, PropType } from '@vue/runtime-core' import type { ExtractPropTypes, PropType } from 'vue'
import type { Mutable } from './types' import type { Mutable } from './types'
const wrapperKey = Symbol() const wrapperKey = Symbol()
......
...@@ -74,7 +74,7 @@ module.exports = { ...@@ -74,7 +74,7 @@ module.exports = {
overrides: [ overrides: [
{ {
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'], files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
extends: ['stylelint-config-recommended'], extends: ['stylelint-config-recommended', 'stylelint-config-prettier', 'stylelint-config-recommended-vue'],
rules: { rules: {
'keyframes-name-pattern': null, 'keyframes-name-pattern': null,
'selector-pseudo-class-no-unknown': [ 'selector-pseudo-class-no-unknown': [
...@@ -94,7 +94,7 @@ module.exports = { ...@@ -94,7 +94,7 @@ module.exports = {
{ {
files: ['*.less', '**/*.less'], files: ['*.less', '**/*.less'],
customSyntax: 'postcss-less', customSyntax: 'postcss-less',
extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'], extends: ['stylelint-config-standard', 'stylelint-config-prettier', 'stylelint-config-recommended-vue'],
}, },
], ],
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论