diff --git a/.eslintignore b/.eslintignore index 2b6018d4d..836806a34 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,9 +3,9 @@ dist *.d.ts /src/assets package.json -.eslintrc.cjs +eslint.config.js .prettierrc.js -commitlint.config.js +commitlint.config.cjs postcss.config.js tailwind.config.ts stylelint.config.cjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index d98215c51..000000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,123 +0,0 @@ -// @ts-check -const { defineConfig } = require("eslint-define-config"); - -module.exports = defineConfig({ - root: true, - env: { - node: true - }, - globals: { - // Ref sugar (take 2) - $: "readonly", - $$: "readonly", - $ref: "readonly", - $shallowRef: "readonly", - $computed: "readonly", - - // index.d.ts - // global.d.ts - Fn: "readonly", - PromiseFn: "readonly", - RefType: "readonly", - LabelValueOptions: "readonly", - EmitType: "readonly", - TargetContext: "readonly", - ComponentElRef: "readonly", - ComponentRef: "readonly", - ElRef: "readonly", - global: "readonly", - ForDataType: "readonly", - ComponentRoutes: "readonly", - - // script setup - defineProps: "readonly", - defineEmits: "readonly", - defineExpose: "readonly", - withDefaults: "readonly" - }, - extends: [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/typescript/recommended", - "@vue/prettier", - "@vue/eslint-config-typescript" - ], - parser: "vue-eslint-parser", - parserOptions: { - parser: "@typescript-eslint/parser", - ecmaVersion: "latest", - sourceType: "module", - jsxPragma: "React", - ecmaFeatures: { - jsx: true - } - }, - overrides: [ - { - files: ["*.ts", "*.vue"], - rules: { - "no-undef": "off" - } - }, - { - files: ["*.vue"], - parser: "vue-eslint-parser", - parserOptions: { - parser: "@typescript-eslint/parser", - extraFileExtensions: [".vue"], - ecmaVersion: "latest", - ecmaFeatures: { - jsx: true - } - }, - rules: { - "no-undef": "off" - } - } - ], - rules: { - "vue/no-v-html": "off", - "vue/require-default-prop": "off", - "vue/require-explicit-emits": "off", - "vue/multi-word-component-names": "off", - "@typescript-eslint/no-explicit-any": "off", // any - "no-debugger": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", // setup() - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "vue/html-self-closing": [ - "error", - { - html: { - void: "always", - normal: "always", - component: "always" - }, - svg: "always", - math: "always" - } - ], - "@typescript-eslint/no-unused-vars": [ - "error", - { - argsIgnorePattern: "^_", - varsIgnorePattern: "^_" - } - ], - "no-unused-vars": [ - "error", - { - argsIgnorePattern: "^_", - varsIgnorePattern: "^_" - } - ], - "prettier/prettier": [ - "error", - { - endOfLine: "auto" - } - ] - } -}); diff --git a/build/info.ts b/build/info.ts index 06006411d..6524092c5 100644 --- a/build/info.ts +++ b/build/info.ts @@ -1,7 +1,7 @@ import type { Plugin } from "vite"; import picocolors from "picocolors"; -import dayjs, { Dayjs } from "dayjs"; import { getPackageSize } from "./utils"; +import dayjs, { type Dayjs } from "dayjs"; import duration from "dayjs/plugin/duration"; dayjs.extend(duration); diff --git a/commitlint.config.js b/commitlint.config.cjs similarity index 88% rename from commitlint.config.js rename to commitlint.config.cjs index eea755d0e..71bc3731b 100644 --- a/commitlint.config.js +++ b/commitlint.config.cjs @@ -1,7 +1,4 @@ -// @ts-check - -/** @type {import("@commitlint/types").UserConfig} */ -export default { +module.exports = { ignores: [commit => commit.includes("init")], extends: ["@commitlint/config-conventional"], rules: { diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000..2d7d72156 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,174 @@ +import js from "@eslint/js"; +import pluginVue from "eslint-plugin-vue"; +import * as parserVue from "vue-eslint-parser"; +import configPrettier from "eslint-config-prettier"; +import pluginPrettier from "eslint-plugin-prettier"; +import { defineFlatConfig } from "eslint-define-config"; +import * as parserTypeScript from "@typescript-eslint/parser"; +import pluginTypeScript from "@typescript-eslint/eslint-plugin"; + +export default defineFlatConfig([ + { + ...js.configs.recommended, + ignores: ["src/assets/**", "src/**/iconfont/**"], + languageOptions: { + globals: { + // index.d.ts + RefType: "readonly", + EmitType: "readonly", + TargetContext: "readonly", + ComponentRef: "readonly", + ElRef: "readonly", + ForDataType: "readonly", + AnyFunction: "readonly", + PropType: "readonly", + Writable: "readonly", + Nullable: "readonly", + NonNullable: "readonly", + Recordable: "readonly", + ReadonlyRecordable: "readonly", + Indexable: "readonly", + DeepPartial: "readonly", + Without: "readonly", + Exclusive: "readonly", + TimeoutHandle: "readonly", + IntervalHandle: "readonly", + Effect: "readonly", + ChangeEvent: "readonly", + WheelEvent: "readonly", + ImportMetaEnv: "readonly", + Fn: "readonly", + PromiseFn: "readonly", + ComponentElRef: "readonly", + parseInt: "readonly", + parseFloat: "readonly" + } + }, + plugins: { + prettier: pluginPrettier + }, + rules: { + ...configPrettier.rules, + ...pluginPrettier.configs.recommended.rules, + "no-debugger": "off", + "no-unused-vars": [ + "error", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_" + } + ], + "prettier/prettier": [ + "error", + { + endOfLine: "auto" + } + ] + } + }, + { + files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"], + languageOptions: { + parser: parserTypeScript, + parserOptions: { + sourceType: "module" + } + }, + plugins: { + "@typescript-eslint": pluginTypeScript + }, + rules: { + ...pluginTypeScript.configs.strict.rules, + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-redeclare": "error", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/prefer-as-const": "warn", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-import-type-side-effects": "error", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/consistent-type-imports": [ + "error", + { disallowTypeAnnotations: false, fixStyle: "inline-type-imports" } + ], + "@typescript-eslint/prefer-literal-enum-member": [ + "error", + { allowBitwiseExpressions: true } + ], + "@typescript-eslint/no-unused-vars": [ + "error", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_" + } + ] + } + }, + { + files: ["**/*.d.ts"], + rules: { + "eslint-comments/no-unlimited-disable": "off", + "import/no-duplicates": "off", + "unused-imports/no-unused-vars": "off" + } + }, + { + files: ["**/*.?([cm])js"], + rules: { + "@typescript-eslint/no-require-imports": "off", + "@typescript-eslint/no-var-requires": "off" + } + }, + { + files: ["**/*.vue"], + languageOptions: { + globals: { + $: "readonly", + $$: "readonly", + $computed: "readonly", + $customRef: "readonly", + $ref: "readonly", + $shallowRef: "readonly", + $toRef: "readonly" + }, + parser: parserVue, + parserOptions: { + ecmaFeatures: { + jsx: true + }, + extraFileExtensions: [".vue"], + parser: "@typescript-eslint/parser", + sourceType: "module" + } + }, + plugins: { + vue: pluginVue + }, + processor: pluginVue.processors[".vue"], + rules: { + ...pluginVue.configs.base.rules, + ...pluginVue.configs["vue3-essential"].rules, + ...pluginVue.configs["vue3-recommended"].rules, + "no-undef": "off", + "no-unused-vars": "off", + "vue/no-v-html": "off", + "vue/require-default-prop": "off", + "vue/require-explicit-emits": "off", + "vue/multi-word-component-names": "off", + "vue/no-setup-props-reactivity-loss": "off", + "vue/html-self-closing": [ + "error", + { + html: { + void: "always", + normal: "always", + component: "always" + }, + svg: "always", + math: "always" + } + ] + } + } +]); diff --git a/package.json b/package.json index fb1c448ac..2063b5ed6 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "devDependencies": { "@commitlint/cli": "^18.2.0", "@commitlint/config-conventional": "^18.1.0", - "@commitlint/types": "^18.4.0", + "@eslint/js": "^8.53.0", "@faker-js/faker": "^8.2.0", "@iconify-icons/ep": "^1.2.12", "@iconify-icons/ri": "^1.2.10", @@ -123,12 +123,11 @@ "@typescript-eslint/parser": "^6.10.0", "@vitejs/plugin-vue": "^4.4.1", "@vitejs/plugin-vue-jsx": "^3.0.2", - "@vue/eslint-config-prettier": "^8.0.0", - "@vue/eslint-config-typescript": "^12.0.0", "autoprefixer": "^10.4.16", "cloc": "^2.11.0", "cssnano": "^6.0.1", "eslint": "^8.53.0", + "eslint-config-prettier": "^9.0.0", "eslint-define-config": "^1.24.1", "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-vue": "^9.18.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ba50a6d09..b18a84c3a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -175,9 +175,9 @@ devDependencies: '@commitlint/config-conventional': specifier: ^18.1.0 version: 18.1.0 - '@commitlint/types': - specifier: ^18.4.0 - version: 18.4.0 + '@eslint/js': + specifier: ^8.53.0 + version: 8.53.0 '@faker-js/faker': specifier: ^8.2.0 version: 8.2.0 @@ -229,12 +229,6 @@ devDependencies: '@vitejs/plugin-vue-jsx': specifier: ^3.0.2 version: 3.0.2(vite@5.0.0-beta.17)(vue@3.3.8) - '@vue/eslint-config-prettier': - specifier: ^8.0.0 - version: 8.0.0(eslint@8.53.0)(prettier@3.0.3) - '@vue/eslint-config-typescript': - specifier: ^12.0.0 - version: 12.0.0(eslint-plugin-vue@9.18.1)(eslint@8.53.0)(typescript@5.2.2) autoprefixer: specifier: ^10.4.16 version: 10.4.16(postcss@8.4.31) @@ -247,12 +241,15 @@ devDependencies: eslint: specifier: ^8.53.0 version: 8.53.0 + eslint-config-prettier: + specifier: ^9.0.0 + version: 9.0.0(eslint@8.53.0) eslint-define-config: specifier: ^1.24.1 version: 1.24.1 eslint-plugin-prettier: specifier: ^5.0.1 - version: 5.0.1(eslint-config-prettier@8.10.0)(eslint@8.53.0)(prettier@3.0.3) + version: 5.0.1(eslint-config-prettier@9.0.0)(eslint@8.53.0)(prettier@3.0.3) eslint-plugin-vue: specifier: ^9.18.1 version: 9.18.1(eslint@8.53.0) @@ -778,10 +775,10 @@ packages: engines: {node: '>=v18'} hasBin: true dependencies: - '@commitlint/format': 18.1.0 - '@commitlint/lint': 18.1.0 - '@commitlint/load': 18.2.0(typescript@5.2.2) - '@commitlint/read': 18.1.0 + '@commitlint/format': 18.4.0 + '@commitlint/lint': 18.4.0 + '@commitlint/load': 18.4.0(typescript@5.2.2) + '@commitlint/read': 18.4.0 '@commitlint/types': 18.4.0 execa: 5.1.1 lodash.isfunction: 3.0.9 @@ -799,16 +796,16 @@ packages: conventional-changelog-conventionalcommits: 7.0.2 dev: true - /@commitlint/config-validator@18.1.0: - resolution: {integrity: sha512-kbHkIuItXn93o2NmTdwi5Mk1ujyuSIysRE/XHtrcps/27GuUKEIqBJp6TdJ4Sq+ze59RlzYSHMKuDKZbfg9+uQ==} + /@commitlint/config-validator@18.4.0: + resolution: {integrity: sha512-1y6qHMU3o4cYQSK+Y9EnmH6H1GRiwQGjnLIUOIKlekrmfc8MrMk1ByNmb8od4vK3qHJAaL/77/5n+1uyyIF5dA==} engines: {node: '>=v18'} dependencies: '@commitlint/types': 18.4.0 ajv: 8.12.0 dev: true - /@commitlint/ensure@18.1.0: - resolution: {integrity: sha512-CkPzJ9UBumIo54VDcpmBlaVX81J++wzEhN3DJH9+6PaLeiIG+gkSx8t7C2gfwG7PaiW4HzQtdQlBN5ab+c4vFQ==} + /@commitlint/ensure@18.4.0: + resolution: {integrity: sha512-N5cJo/n61ULSwz3W5Iz/IZJ0I9H/PaHc+OMcF2XcRVbLa6B3YwzEW66XGCRKVULlsBNSrIH6tk5un9ayXAXIdw==} engines: {node: '>=v18'} dependencies: '@commitlint/types': 18.4.0 @@ -819,44 +816,44 @@ packages: lodash.upperfirst: 4.3.1 dev: true - /@commitlint/execute-rule@18.1.0: - resolution: {integrity: sha512-w3Vt4K+O7+nSr9/gFSEfZ1exKUOPSlJaRpnk7Y+XowEhvwT7AIk1HNANH+gETf0zGZ020+hfiMW/Ome+SNCUsg==} + /@commitlint/execute-rule@18.4.0: + resolution: {integrity: sha512-g013SWki6ZWhURBLOSXTaVQGWHdA0QlPJGiW4a+YpThezmJOemvc4LiKVpn13AjSKQ40QnmBqpBrxujOaSo+3A==} engines: {node: '>=v18'} dev: true - /@commitlint/format@18.1.0: - resolution: {integrity: sha512-So/w217tGWMZZb1yXcUFNF2qFLyYtSVqbnGoMbX8a+JKcG4oB11Gc1adS0ssUOMivtiNpaLtkSHFynyiwtJtiQ==} + /@commitlint/format@18.4.0: + resolution: {integrity: sha512-MiAe4D5/ahty38CzULdQbpRa3ReKZtx0kyigOWcntq+N5uqez+Ac4/MO7H+3j1kC4G7nfJVfBu6TqcXeyNvhCQ==} engines: {node: '>=v18'} dependencies: '@commitlint/types': 18.4.0 chalk: 4.1.2 dev: true - /@commitlint/is-ignored@18.1.0: - resolution: {integrity: sha512-fa1fY93J/Nx2GH6r6WOLdBOiL7x9Uc1N7wcpmaJ1C5Qs6P+rPSUTkofe2IOhSJIJoboHfAH6W0ru4xtK689t0Q==} + /@commitlint/is-ignored@18.4.0: + resolution: {integrity: sha512-vyBKBj3Q4N3Xe4ZQcJXW9ef6gVrDL9Fl2HXnnC3F0Qt/F6E4runhJkEuUh5DB3WCXTJUHIJkByKPqrnz4RNrZw==} engines: {node: '>=v18'} dependencies: '@commitlint/types': 18.4.0 semver: 7.5.4 dev: true - /@commitlint/lint@18.1.0: - resolution: {integrity: sha512-LGB3eI5UYu5LLayibNrRM4bSbowr1z9uyqvp0c7+0KaSJi+xHxy/QEhb6fy4bMAtbXEvygY0sUu9HxSWg41rVQ==} + /@commitlint/lint@18.4.0: + resolution: {integrity: sha512-Wkkf1DPVeLdHYGqtzMBfWoMbUtCojvlzDR89OKVic1rid41iZbb0FzTcwgMYs/1TNWNxoIq9PVVwY7ovLX1aJQ==} engines: {node: '>=v18'} dependencies: - '@commitlint/is-ignored': 18.1.0 - '@commitlint/parse': 18.1.0 - '@commitlint/rules': 18.1.0 + '@commitlint/is-ignored': 18.4.0 + '@commitlint/parse': 18.4.0 + '@commitlint/rules': 18.4.0 '@commitlint/types': 18.4.0 dev: true - /@commitlint/load@18.2.0(typescript@5.2.2): - resolution: {integrity: sha512-xjX3d3CRlOALwImhOsmLYZh14/+gW/KxsY7+bPKrzmGuFailf9K7ckhB071oYZVJdACnpY4hDYiosFyOC+MpAA==} + /@commitlint/load@18.4.0(typescript@5.2.2): + resolution: {integrity: sha512-7unGl1HGRNMgWrUPmj8OFkJyuNUMb6xA1i53/OAFKd9l+U3C4WTfoJe3t/TUz8vKZLCaDcWWR/b2cw5HveBBFg==} engines: {node: '>=v18'} dependencies: - '@commitlint/config-validator': 18.1.0 - '@commitlint/execute-rule': 18.1.0 - '@commitlint/resolve-extends': 18.1.0 + '@commitlint/config-validator': 18.4.0 + '@commitlint/execute-rule': 18.4.0 + '@commitlint/resolve-extends': 18.4.0 '@commitlint/types': 18.4.0 '@types/node': 18.18.9 chalk: 4.1.2 @@ -870,13 +867,13 @@ packages: - typescript dev: true - /@commitlint/message@18.1.0: - resolution: {integrity: sha512-8dT/jJg73wf3o2Mut/fqEDTpBYSIEVtX5PWyuY/0uviEYeheZAczFo/VMIkeGzhJJn1IrcvAwWsvJ1lVGY2I/w==} + /@commitlint/message@18.4.0: + resolution: {integrity: sha512-3kg6NQO6pJ+VdBTWi51KInT8ngkxPJaW+iI7URtUALjKcO9K4XY3gf80ZPmS1hDessrjb7qCr1lau8eWMINAQw==} engines: {node: '>=v18'} dev: true - /@commitlint/parse@18.1.0: - resolution: {integrity: sha512-23yv8uBweXWYn8bXk4PjHIsmVA+RkbqPh2h7irupBo2LthVlzMRc4LM6UStasScJ4OlXYYaWOmuP7jcExUF50Q==} + /@commitlint/parse@18.4.0: + resolution: {integrity: sha512-SxTCSUZH8CJNYWOlFg18YUQ2RLz8ubXKbpHUIiSNwCbiQx7UDCydp1JnhoB4sOYOxgV8d3nuDwYluRU5KnEY4A==} engines: {node: '>=v18'} dependencies: '@commitlint/types': 18.4.0 @@ -884,22 +881,22 @@ packages: conventional-commits-parser: 5.0.0 dev: true - /@commitlint/read@18.1.0: - resolution: {integrity: sha512-rzfzoKUwxmvYO81tI5o1371Nwt3vhcQR36oTNfupPdU1jgSL3nzBIS3B93LcZh3IYKbCIMyMPN5WZ10BXdeoUg==} + /@commitlint/read@18.4.0: + resolution: {integrity: sha512-IpnABCbDeOw5npZ09SZZGLfd3T7cFtsxUYm6wT3aGmIB2fXKE3fMeuj3jxXjMibiGIyA3Z5voCMuOcKWpkNySA==} engines: {node: '>=v18'} dependencies: - '@commitlint/top-level': 18.1.0 + '@commitlint/top-level': 18.4.0 '@commitlint/types': 18.4.0 fs-extra: 11.1.1 git-raw-commits: 2.0.11 minimist: 1.2.8 dev: true - /@commitlint/resolve-extends@18.1.0: - resolution: {integrity: sha512-3mZpzOEJkELt7BbaZp6+bofJyxViyObebagFn0A7IHaLARhPkWTivXdjvZHS12nAORftv88Yhbh8eCPKfSvB7g==} + /@commitlint/resolve-extends@18.4.0: + resolution: {integrity: sha512-qhgU6ach+S6sJMD9NjCYiEycOObGhxzWQLQzqlScJCv9zkPs15Bg0ffLXTQ3z7ipXv46XEKYMnSJzjLRw2Tlkg==} engines: {node: '>=v18'} dependencies: - '@commitlint/config-validator': 18.1.0 + '@commitlint/config-validator': 18.4.0 '@commitlint/types': 18.4.0 import-fresh: 3.3.0 lodash.mergewith: 4.6.2 @@ -907,24 +904,24 @@ packages: resolve-global: 1.0.0 dev: true - /@commitlint/rules@18.1.0: - resolution: {integrity: sha512-VJNQ674CRv4znI0DbsjZLVnn647J+BTxHGcrDIsYv7c99gW7TUGeIe5kL80G7l8+5+N0se8v9yn+Prr8xEy6Yw==} + /@commitlint/rules@18.4.0: + resolution: {integrity: sha512-T3ChRxQZ6g0iNCpVLc6KeQId0/86TnyQA8PFkng+dWElO2DAA5km/yirgKZV1Xlc+gF7Rf6d+a0ottxdKpOY+w==} engines: {node: '>=v18'} dependencies: - '@commitlint/ensure': 18.1.0 - '@commitlint/message': 18.1.0 - '@commitlint/to-lines': 18.1.0 + '@commitlint/ensure': 18.4.0 + '@commitlint/message': 18.4.0 + '@commitlint/to-lines': 18.4.0 '@commitlint/types': 18.4.0 execa: 5.1.1 dev: true - /@commitlint/to-lines@18.1.0: - resolution: {integrity: sha512-aHIoSDjG0ckxPLYDpODUeSLbEKmF6Jrs1B5JIssbbE9eemBtXtjm9yzdiAx9ZXcwoHlhbTp2fbndDb3YjlvJag==} + /@commitlint/to-lines@18.4.0: + resolution: {integrity: sha512-bZXuCtfBPjNgtEnG3gwJrveIgfKK2UdhIhFvKpMTrQl/gAwoto/3mzmE7qGAHwmuP4eZ2U8X7iwMnqIlWmv2Tw==} engines: {node: '>=v18'} dev: true - /@commitlint/top-level@18.1.0: - resolution: {integrity: sha512-1/USHlolIxJlsfLKecSXH+6PDojIvnzaJGPYwF7MtnTuuXCNQ4izkeqDsRuNMe9nU2VIKpK9OT8Q412kGNmgGw==} + /@commitlint/top-level@18.4.0: + resolution: {integrity: sha512-TfulcA8UHF7MZ6tm4Ci3aqZgMBZa1OoCg4prccWHvwG/hsHujZ7+0FKbeKqDbcSli/YWm4NJwEjl4uh5itIJeA==} engines: {node: '>=v18'} dependencies: find-up: 5.0.0 @@ -2378,41 +2375,6 @@ packages: /@vue/devtools-api@6.5.1: resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==} - /@vue/eslint-config-prettier@8.0.0(eslint@8.53.0)(prettier@3.0.3): - resolution: {integrity: sha512-55dPqtC4PM/yBjhAr+yEw6+7KzzdkBuLmnhBrDfp4I48+wy+Giqqj9yUr5T2uD/BkBROjjmqnLZmXRdOx/VtQg==} - peerDependencies: - eslint: '>= 8.0.0' - prettier: '>= 3.0.0' - dependencies: - eslint: 8.53.0 - eslint-config-prettier: 8.10.0(eslint@8.53.0) - eslint-plugin-prettier: 5.0.1(eslint-config-prettier@8.10.0)(eslint@8.53.0)(prettier@3.0.3) - prettier: 3.0.3 - transitivePeerDependencies: - - '@types/eslint' - dev: true - - /@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@9.18.1)(eslint@8.53.0)(typescript@5.2.2): - resolution: {integrity: sha512-StxLFet2Qe97T8+7L8pGlhYBBr8Eg05LPuTDVopQV6il+SK6qqom59BA/rcFipUef2jD8P2X44Vd8tMFytfvlg==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 - eslint-plugin-vue: ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/eslint-plugin': 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2) - eslint: 8.53.0 - eslint-plugin-vue: 9.18.1(eslint@8.53.0) - typescript: 5.2.2 - vue-eslint-parser: 9.3.2(eslint@8.53.0) - transitivePeerDependencies: - - supports-color - dev: true - /@vue/language-core@1.8.22(typescript@5.2.2): resolution: {integrity: sha512-bsMoJzCrXZqGsxawtUea1cLjUT9dZnDsy5TuZ+l1fxRMzUGQUG9+Ypq4w//CqpWmrx7nIAJpw2JVF/t258miRw==} peerDependencies: @@ -4224,8 +4186,8 @@ packages: optionalDependencies: source-map: 0.6.1 - /eslint-config-prettier@8.10.0(eslint@8.53.0): - resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} + /eslint-config-prettier@9.0.0(eslint@8.53.0): + resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -4238,7 +4200,7 @@ packages: engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>= 8.6.0'} dev: true - /eslint-plugin-prettier@5.0.1(eslint-config-prettier@8.10.0)(eslint@8.53.0)(prettier@3.0.3): + /eslint-plugin-prettier@5.0.1(eslint-config-prettier@9.0.0)(eslint@8.53.0)(prettier@3.0.3): resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -4253,7 +4215,7 @@ packages: optional: true dependencies: eslint: 8.53.0 - eslint-config-prettier: 8.10.0(eslint@8.53.0) + eslint-config-prettier: 9.0.0(eslint@8.53.0) prettier: 3.0.3 prettier-linter-helpers: 1.0.0 synckit: 0.8.5 diff --git a/src/components/ReAnimateSelector/src/index.vue b/src/components/ReAnimateSelector/src/index.vue index e2f44053b..c8ec17f7d 100644 --- a/src/components/ReAnimateSelector/src/index.vue +++ b/src/components/ReAnimateSelector/src/index.vue @@ -81,8 +81,8 @@ function onMouseleave() { placeholder="请选择动画" clearable filterable - @clear="onClear" :filter-method="filterMethod" + @clear="onClear" > diff --git a/src/components/ReIcon/src/hooks.ts b/src/components/ReIcon/src/hooks.ts index 4f430a894..675d303d1 100644 --- a/src/components/ReIcon/src/hooks.ts +++ b/src/components/ReIcon/src/hooks.ts @@ -1,5 +1,5 @@ -import { iconType } from "./types"; -import { h, defineComponent, Component } from "vue"; +import type { iconType } from "./types"; +import { h, defineComponent, type Component } from "vue"; import { IconifyIconOnline, IconifyIconOffline, FontIcon } from "../index"; /** diff --git a/src/components/ReQrcode/src/index.tsx b/src/components/ReQrcode/src/index.tsx index 737440288..8d517547e 100644 --- a/src/components/ReQrcode/src/index.tsx +++ b/src/components/ReQrcode/src/index.tsx @@ -4,13 +4,13 @@ import { watch, nextTick, computed, - PropType, + type PropType, defineComponent } from "vue"; import "./index.scss"; import propTypes from "@/utils/propTypes"; import { isString, cloneDeep } from "@pureadmin/utils"; -import QRCode, { QRCodeRenderersOptions } from "qrcode"; +import QRCode, { type QRCodeRenderersOptions } from "qrcode"; import RefreshRight from "@iconify-icons/ep/refresh-right"; interface QrcodeLogo { diff --git a/src/components/ReSeamlessScroll/src/index.vue b/src/components/ReSeamlessScroll/src/index.vue index 78ac77b5a..e0f90d2b9 100644 --- a/src/components/ReSeamlessScroll/src/index.vue +++ b/src/components/ReSeamlessScroll/src/index.vue @@ -498,16 +498,16 @@ defineExpose({ diff --git a/src/components/ReSelector/src/index.tsx b/src/components/ReSelector/src/index.tsx index afd0d5a18..ededc06d7 100644 --- a/src/components/ReSelector/src/index.tsx +++ b/src/components/ReSelector/src/index.tsx @@ -55,7 +55,6 @@ export default defineComponent({ emits: ["selectedVal"], setup(props, { emit }) { const instance = getCurrentInstance(); - // eslint-disable-next-line vue/no-setup-props-destructure const currentValue = props.value; const rateDisabled = computed(() => { diff --git a/src/components/ReSplitPane/index.tsx b/src/components/ReSplitPane/index.tsx index 621a57ce2..8a33ae515 100644 --- a/src/components/ReSplitPane/index.tsx +++ b/src/components/ReSplitPane/index.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ref, unref, computed, PropType } from "vue"; +import { defineComponent, ref, unref, computed, type PropType } from "vue"; import resizer from "./resizer"; import "./index.css"; diff --git a/src/config/index.ts b/src/config/index.ts index 4eaaa4591..54dd959cc 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,4 +1,4 @@ -import { App } from "vue"; +import type { App } from "vue"; import axios from "axios"; let config: object = {}; diff --git a/src/layout/components/appMain.vue b/src/layout/components/appMain.vue index 260a0221f..b3564cd7d 100644 --- a/src/layout/components/appMain.vue +++ b/src/layout/components/appMain.vue @@ -50,6 +50,12 @@ const getSectionStyle = computed(() => { }); const transitionMain = defineComponent({ + props: { + route: { + type: undefined, + required: true + } + }, render() { const transitionName = transitions.value(this.route)?.name || "fade-transform"; @@ -72,12 +78,6 @@ const transitionMain = defineComponent({ default: () => [this.$slots.default()] } ); - }, - props: { - route: { - type: undefined, - required: true - } } }); @@ -118,8 +118,8 @@ const transitionMain = defineComponent({ /> @@ -140,8 +140,8 @@ const transitionMain = defineComponent({ /> diff --git a/src/layout/components/navbar.vue b/src/layout/components/navbar.vue index 752fdb034..c13b785f6 100644 --- a/src/layout/components/navbar.vue +++ b/src/layout/components/navbar.vue @@ -62,8 +62,8 @@ const { t, locale, translationCh, translationEn } = useTranslationLang(); @click="translationCh" > 简体中文 @@ -73,7 +73,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang(); :class="['dark:!text-white', getDropdownItemClass(locale, 'en')]" @click="translationEn" > - + English diff --git a/src/layout/components/notice/index.vue b/src/layout/components/notice/index.vue index 3a3772099..443c1c03c 100644 --- a/src/layout/components/notice/index.vue +++ b/src/layout/components/notice/index.vue @@ -23,8 +23,8 @@ notices.value.map(v => (noticesNum.value += v.list.length));