From fc407227aea0b47fa74c2d21c82c3c5cb077ec94 Mon Sep 17 00:00:00 2001 From: Wisdom Date: Fri, 12 Apr 2024 16:29:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=A9=20chore:=20eslint=20v9=20flat=20co?= =?UTF-8?q?nfig=20(#40)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 8 - .eslintrc.cjs | 108 ------ eslint.config.js | 324 ++++++++++++++++++ package.json | 7 +- pnpm-lock.yaml | 183 +++++----- src/App.vue | 2 +- src/components/index.ts | 15 +- src/mixins/RulesForm.vue | 6 +- src/modules/Project/pages/list.vue | 4 +- src/modules/Project/store/index.ts | 4 +- .../components/ContainerLayout.vue | 2 +- src/modules/UserAccount/store/index.ts | 4 +- src/plugins/DiscreteModal/index.ts | 2 +- src/shims-vue.d.ts | 2 +- src/types/index.d.ts | 6 +- src/utils/camelCase.ts | 14 +- 16 files changed, 449 insertions(+), 242 deletions(-) delete mode 100755 .eslintignore delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100755 index 299f8e2..0000000 --- a/.eslintignore +++ /dev/null @@ -1,8 +0,0 @@ -build -cache -dist -tmp -node_modules -coverage -public -src/assets/fonts/iconfont.js diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 2bfbc59..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,108 +0,0 @@ -module.exports = { - root: true, - env: { - browser: true, - node: true, - es2021: true, - 'vue/setup-compiler-macros': true - }, - parser: 'vue-eslint-parser', - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:vue/vue3-recommended', - './.eslintrc-auto-import-costom.json', - './.eslintrc-auto-import.json' - ], - plugins: [ - '@typescript-eslint' - ], - parserOptions: { - ecmaVersion: 12, - sourceType: 'module', - parser: '@typescript-eslint/parser' - }, - rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-unused-vars': 1, - 'no-undef': 'off', - // https://eslint.org/docs/rules/no-var - 'no-var': 'error', - // https://cn.eslint.org/docs/rules/no-trailing-spaces - 'no-trailing-spaces': 2, // 禁用行尾空白 - 'comma-style': ['error', 'last'], - 'comma-dangle': ['error', 'never'], - 'no-irregular-whitespace': 2, - 'no-multi-spaces': 1, - 'no-multiple-empty-lines': [ - 2, - { - max: 3 - } - ], - // https://cn.eslint.org/docs/rules/eol-last - 'eol-last': 2, - quotes: [ - 'error', - 'single', - { - avoidEscape: true, - allowTemplateLiterals: true - } - ], - // https://eslint.org/docs/rules/prefer-const - 'prefer-const': 2, - camelcase: ['off', { properties: 'never' }], - // https://github.com/eslint/eslint/issues/13956 - '@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }], - '@typescript-eslint/no-unused-vars': 1, - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/member-delimiter-style': [ - 'error', - { - multiline: { - delimiter: 'none', - requireLast: false - }, - singleline: { - delimiter: 'semi', - requireLast: true - } - } - ], - '@typescript-eslint/no-empty-function': 0, - '@typescript-eslint/no-non-null-assertion': 0, - // semi: ['error', 'never'], - '@typescript-eslint/semi': ['error', 'never'], - // vue - 'vue/no-v-html': 'off', - 'vue/multi-word-component-names': 0, - 'vue/singleline-html-element-content-newline': 'off', - 'vue/require-default-prop': 'off', - 'vue/html-closing-bracket-spacing': 'error', - 'vue/no-unused-components': 1, - 'vue/no-mutating-props': 0, - 'vue/v-on-event-hyphenation': ['warn', 'always', { - autofix: true - }], - 'vue/script-setup-uses-vars': 'error', - 'vue/html-self-closing': ['error', { - html: { - void: 'never', - normal: 'never', - component: 'always' - }, - svg: 'always', - math: 'always' - }] - }, - // https://github.com/vuejs/eslint-plugin-vue/issues/1355 - 'overrides': [ - { - 'files': ['*.html'], - 'processor': 'vue/.vue' - } - ] -} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..2da1af4 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,324 @@ +// import antfu from '@antfu/eslint-config' +// export default antfu() + +import { defineFlatConfig } from 'eslint-define-config'; + +import * as parserTypeScript from '@typescript-eslint/parser'; +import pluginTypeScript from '@typescript-eslint/eslint-plugin'; + +import * as parserVue from 'vue-eslint-parser'; +import pluginVue from 'eslint-plugin-vue'; +import js from '@eslint/js'; + +function renameRules(rules, map) { + return Object.fromEntries( + Object.entries(rules).map(([key, value]) => { + for (const [from, to] of Object.entries(map)) { + if (key.startsWith(`${from}/`)) + return [to + key.slice(from.length), value]; + } + return [key, value]; + }) + ); +} + +export default defineFlatConfig([ + { + ...js.configs.recommended, + ignores: ['public', 'build', 'dist', 'node_modules', 'coverage', 'src/assets/**'], + languageOptions: { + ecmaVersion: 2022, + globals: { + document: 'readonly', + navigator: 'readonly', + window: 'readonly' + }, + parserOptions: { + ecmaFeatures: { + jsx: true + }, + ecmaVersion: 2022, + sourceType: 'module' + }, + sourceType: 'module' + }, + rules: { + 'accessor-pairs': ['error', { enforceForClassMembers: true, setWithoutGet: true }], + 'array-callback-return': 'error', + 'block-scoped-var': 'error', + 'comma-spacing': ['error', { after: true, before: false }], + 'constructor-super': 'error', + 'default-case-last': 'error', + 'dot-notation': ['error', { allowKeywords: true }], + 'eqeqeq': ['error', 'smart'], + 'new-cap': ['error', { capIsNew: false, newIsCap: true, properties: true }], + 'no-alert': 'error', + 'no-array-constructor': 'error', + 'no-async-promise-executor': 'error', + 'no-caller': 'error', + 'no-case-declarations': 'error', + 'no-class-assign': 'error', + 'no-compare-neg-zero': 'error', + 'no-cond-assign': ['error', 'always'], + 'no-console': ['error', { allow: ['log', 'warn', 'error'] }], + 'no-const-assign': 'error', + 'no-control-regex': 'error', + 'no-debugger': 'error', + 'no-delete-var': 'error', + 'no-dupe-args': 'error', + 'no-dupe-class-members': 'error', + 'no-dupe-keys': 'error', + 'no-duplicate-case': 'error', + 'no-empty': ['error', { allowEmptyCatch: true }], + 'no-empty-character-class': 'error', + 'no-empty-pattern': 'error', + 'no-eval': 'error', + 'no-ex-assign': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-boolean-cast': 'error', + 'no-fallthrough': 'error', + 'no-func-assign': 'error', + 'no-global-assign': 'error', + 'no-implied-eval': 'error', + 'no-import-assign': 'error', + 'no-invalid-regexp': 'error', + 'no-irregular-whitespace': 'error', + 'no-iterator': 'error', + 'no-labels': ['error', { allowLoop: false, allowSwitch: false }], + 'no-lone-blocks': 'error', + 'no-loss-of-precision': 'error', + 'no-misleading-character-class': 'error', + 'no-multi-str': 'error', + 'no-new': 'error', + 'no-new-func': 'error', + 'no-new-native-nonconstructor': 'error', + 'no-new-wrappers': 'error', + 'no-obj-calls': 'error', + 'no-octal': 'error', + 'no-octal-escape': 'error', + 'no-proto': 'error', + 'no-prototype-builtins': 'error', + 'no-redeclare': ['error', { builtinGlobals: false }], + 'no-regex-spaces': 'error', + 'no-restricted-globals': [ + 'error', + { message: 'Use `globalThis` instead.', name: 'global' }, + { message: 'Use `globalThis` instead.', name: 'self' } + ], + 'no-restricted-properties': [ + 'error', + { message: 'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.', property: '__proto__' }, + { message: 'Use `Object.defineProperty` instead.', property: '__defineGetter__' }, + { message: 'Use `Object.defineProperty` instead.', property: '__defineSetter__' }, + { message: 'Use `Object.getOwnPropertyDescriptor` instead.', property: '__lookupGetter__' }, + { message: 'Use `Object.getOwnPropertyDescriptor` instead.', property: '__lookupSetter__' } + ], + 'no-restricted-syntax': [ + 'error', + 'DebuggerStatement', + 'LabeledStatement', + 'WithStatement', + 'TSEnumDeclaration[const=true]', + 'TSExportAssignment' + ], + 'no-self-assign': ['error', { props: true }], + 'no-self-compare': 'error', + 'no-sequences': 'error', + 'no-shadow-restricted-names': 'error', + 'no-sparse-arrays': 'error', + 'no-template-curly-in-string': 'error', + 'no-this-before-super': 'error', + 'no-throw-literal': 'error', + 'no-undef': 'error', + 'no-undef-init': 'error', + 'no-unexpected-multiline': 'error', + 'no-unmodified-loop-condition': 'error', + 'no-unneeded-ternary': ['error', { defaultAssignment: false }], + 'no-unreachable': 'error', + 'no-unreachable-loop': 'error', + 'no-unsafe-finally': 'error', + 'no-unsafe-negation': 'error', + 'no-unused-expressions': ['error', { + allowShortCircuit: true, + allowTaggedTemplates: true, + allowTernary: true + }], + 'no-unused-vars': ['error', { + args: 'none', + caughtErrors: 'none', + ignoreRestSiblings: true, + vars: 'all' + }], + 'no-use-before-define': ['error', { classes: false, functions: false, variables: true }], + 'no-useless-backreference': 'error', + 'no-useless-call': 'error', + 'no-useless-catch': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-constructor': 'error', + 'no-useless-rename': 'error', + 'no-useless-return': 'error', + 'no-var': 'error', + 'no-with': 'error', + 'object-shorthand': [ + 'error', + 'always', + { + avoidQuotes: true, + ignoreConstructors: false + } + ], + 'one-var': ['error', { initialized: 'never' }], + 'prefer-arrow-callback': [ + 'error', + { + allowNamedFunctions: false, + allowUnboundThis: true + } + ], + 'prefer-const': [ + 'error', + { + destructuring: 'all', + ignoreReadBeforeAssign: true + } + ], + 'prefer-exponentiation-operator': 'error', + 'prefer-promise-reject-errors': 'error', + 'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }], + 'prefer-rest-params': 'error', + 'prefer-spread': 'error', + 'prefer-template': 'error', + 'sort-imports': [ + 'error', + { + allowSeparatedGroups: false, + ignoreCase: false, + ignoreDeclarationSort: true, + ignoreMemberSort: false, + memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'] + } + ], + + // https://cn.eslint.org/docs/rules/no-trailing-spaces + 'no-trailing-spaces': 2, // 禁用行尾空白 + 'comma-style': ['error', 'last'], + 'comma-dangle': ['error', 'never'], + 'no-multi-spaces': 1, + 'no-multiple-empty-lines': [ + 2, + { + max: 2 + } + ], + // https://cn.eslint.org/docs/rules/eol-last + 'eol-last': 2, + 'quotes': [ + 'error', + 'single', + { + avoidEscape: true, + allowTemplateLiterals: true + } + ] + } + }, + { + files: ['**/*.vue', '**/*.?([cm])ts', '**/*.?([cm])tsx'], + languageOptions: { + parser: parserTypeScript, + parserOptions: { + ecmaVersion: 2022, + sourceType: 'module', + ecmaFeatures: { + jsx: true + } + } + }, + plugins: { + '@typescript-eslint': pluginTypeScript + }, + rules: { + ...renameRules( + pluginTypeScript.configs['eslint-recommended'].overrides[0].rules, + { '@typescript-eslint': 'ts' } + ), + ...pluginTypeScript.configs.recommended.rules, + '@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }], + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 1, + '@typescript-eslint/member-delimiter-style': [ + 'error', + { + multiline: { + delimiter: 'none', + requireLast: false + }, + singleline: { + delimiter: 'semi', + requireLast: true + } + } + ], + '@typescript-eslint/no-empty-function': 0, + '@typescript-eslint/no-non-null-assertion': 0, + '@typescript-eslint/semi': ['error', 'never'] + } + }, + { + files: ['*.d.ts'], + rules: { + 'eslint-comments/no-unlimited-disable': 'off', + 'import/no-duplicates': 'off', + 'unused-imports/no-unused-vars': 'off' + } + }, + + { + files: ['**/*.vue'], + languageOptions: { + parser: parserVue, + parserOptions: { + parser: parserTypeScript, + ecmaVersion: 2022, + sourceType: 'module', + jsxPragma: 'React', + ecmaFeatures: { + jsx: true + }, + extraFileExtensions: ['.vue'] + } + }, + plugins: { + vue: pluginVue + }, + processor: pluginVue.processors['.vue'], + rules: { + ...pluginVue.configs.base.rules, + ...pluginVue.configs['vue3-essential'].rules, + ...pluginVue.configs['vue3-strongly-recommended'].rules, + ...pluginVue.configs['vue3-recommended'].rules, + 'vue/no-v-html': 'off', + 'vue/multi-word-component-names': 0, + 'vue/singleline-html-element-content-newline': 'off', + 'vue/require-default-prop': 'off', + 'vue/html-closing-bracket-spacing': 'error', + 'vue/no-unused-components': 1, + 'vue/no-mutating-props': 0, + 'vue/v-on-event-hyphenation': ['warn', 'always', { + autofix: true + }], + 'vue/script-setup-uses-vars': 'error', + 'vue/html-self-closing': ['error', { + html: { + void: 'never', + normal: 'never', + component: 'always' + }, + svg: 'always', + math: 'always' + }] + } + } +]); diff --git a/package.json b/package.json index 48c7b37..c49f4db 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "build": "vite build", "deploy:gh-pages": "cross-env VITE_ROUTER_MODE=hash pnpm build", "preview": "vite preview --host", - "lint": "eslint ./src --ext .js,.ts,.jsx,.tsx,.vue", - "lint:fix": "eslint --fix --cache --ext .js,.ts,.jsx,.tsx,.vue ./src", + "lint": "eslint ./src", + "lint:fix": "eslint --fix ./src", "test": "vitest", "test:coverage": "vitest run --coverage", "stylelint": "stylelint .scss, .vue ./src", @@ -87,7 +87,8 @@ "@vue/test-utils": "2.4.5", "babel-plugin-transform-vite-meta-env": "^1.0.3", "cross-env": "^7.0.3", - "eslint": "^8.57.0", + "eslint": "^9.0.0", + "eslint-define-config": "^2.1.0", "eslint-plugin-html": "8.0.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-vue": "^9.24.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fba7573..a500ea5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -93,10 +93,10 @@ devDependencies: version: 0.2.3 '@typescript-eslint/eslint-plugin': specifier: ^7.5.0 - version: 7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.3) + version: 7.5.0(@typescript-eslint/parser@7.5.0)(eslint@9.0.0)(typescript@5.4.3) '@typescript-eslint/parser': specifier: ^7.5.0 - version: 7.5.0(eslint@8.57.0)(typescript@5.4.3) + version: 7.5.0(eslint@9.0.0)(typescript@5.4.3) '@vitejs/plugin-vue': specifier: ^5.0.4 version: 5.0.4(vite@5.2.7)(vue@3.4.21) @@ -116,17 +116,20 @@ devDependencies: specifier: ^7.0.3 version: 7.0.3 eslint: - specifier: ^8.57.0 - version: 8.57.0 + specifier: ^9.0.0 + version: 9.0.0 + eslint-define-config: + specifier: ^2.1.0 + version: 2.1.0 eslint-plugin-html: specifier: 8.0.0 version: 8.0.0 eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.5.0)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.5.0)(eslint@9.0.0) eslint-plugin-vue: specifier: ^9.24.0 - version: 9.24.0(eslint@8.57.0) + version: 9.24.0(eslint@9.0.0) identity-obj-proxy: specifier: ^3.0.0 version: 3.0.0 @@ -1696,13 +1699,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): + /@eslint-community/eslint-utils@4.4.0(eslint@9.0.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.57.0 + eslint: 9.0.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1711,14 +1714,14 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.4: - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@eslint/eslintrc@3.0.2: + resolution: {integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.6.1 - globals: 13.24.0 + espree: 10.0.1 + globals: 14.0.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -1728,13 +1731,13 @@ packages: - supports-color dev: true - /@eslint/js@8.57.0: - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@eslint/js@9.0.0: + resolution: {integrity: sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true - /@humanwhocodes/config-array@0.11.14: - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + /@humanwhocodes/config-array@0.12.3: + resolution: {integrity: sha512-jsNnTBlMWuTpDkeE3on7+dWJi0D6fdDfeANj/w7MpS8ztROCoLvIO2nG0CcFj+E4k8j4QrSTh4Oryi3i2G669g==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -2101,7 +2104,7 @@ packages: /@types/web-bluetooth@0.0.20: resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} - /@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0)(eslint@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -2113,13 +2116,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.5.0(eslint@9.0.0)(typescript@5.4.3) '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/type-utils': 7.5.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/type-utils': 7.5.0(eslint@9.0.0)(typescript@5.4.3) + '@typescript-eslint/utils': 7.5.0(eslint@9.0.0)(typescript@5.4.3) '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -2130,7 +2133,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/parser@7.5.0(eslint@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -2145,7 +2148,7 @@ packages: '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.3) '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 typescript: 5.4.3 transitivePeerDependencies: - supports-color @@ -2159,7 +2162,7 @@ packages: '@typescript-eslint/visitor-keys': 7.5.0 dev: true - /@typescript-eslint/type-utils@7.5.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/type-utils@7.5.0(eslint@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -2170,9 +2173,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.3) - '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/utils': 7.5.0(eslint@9.0.0)(typescript@5.4.3) debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 ts-api-utils: 1.3.0(typescript@5.4.3) typescript: 5.4.3 transitivePeerDependencies: @@ -2206,19 +2209,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@7.5.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/utils@7.5.0(eslint@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 7.5.0 '@typescript-eslint/types': 7.5.0 '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.3) - eslint: 8.57.0 + eslint: 9.0.0 semver: 7.6.0 transitivePeerDependencies: - supports-color @@ -2233,10 +2236,6 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@ungap/structured-clone@1.2.0: - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - dev: true - /@unocss/astro@0.59.0-beta.1(rollup@4.14.0)(vite@5.2.7): resolution: {integrity: sha512-RAtk3vd6a27CVCxJfbSl1k2ZsSb8hj0bV8+wF2hrp6T/Ptwx5v0vlhbu40P9XawN13ZIcaRpB6D/C9x3k89roQ==} peerDependencies: @@ -3330,13 +3329,6 @@ packages: esutils: 2.0.3 dev: true - /doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dependencies: - esutils: 2.0.3 - dev: true - /dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} dependencies: @@ -3563,6 +3555,11 @@ packages: engines: {node: '>=12'} dev: true + /eslint-define-config@2.1.0: + resolution: {integrity: sha512-QUp6pM9pjKEVannNAbSJNeRuYwW3LshejfyBBpjeMGaJjaDUpVps4C6KVR8R7dWZnD3i0synmrE36znjTkJvdQ==} + engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>=8.6.0'} + dev: true + /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: @@ -3573,7 +3570,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.5.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.5.0)(eslint-import-resolver-node@0.3.9)(eslint@9.0.0): resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} peerDependencies: @@ -3594,9 +3591,9 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.5.0(eslint@9.0.0)(typescript@5.4.3) debug: 3.2.7 - eslint: 8.57.0 + eslint: 9.0.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color @@ -3609,7 +3606,7 @@ packages: htmlparser2: 9.1.0 dev: true - /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.5.0)(eslint@8.57.0): + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.5.0)(eslint@9.0.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -3619,16 +3616,16 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.5.0(eslint@9.0.0)(typescript@5.4.3) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.0 + eslint: 9.0.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.5.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.5.0)(eslint-import-resolver-node@0.3.9)(eslint@9.0.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -3644,20 +3641,20 @@ packages: - supports-color dev: true - /eslint-plugin-vue@9.24.0(eslint@8.57.0): + /eslint-plugin-vue@9.24.0(eslint@9.0.0): resolution: {integrity: sha512-9SkJMvF8NGMT9aQCwFc5rj8Wo1XWSMSHk36i7ZwdI614BU7sIOR28ZjuFPKp8YGymZN12BSEbiSwa7qikp+PBw==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) + eslint: 9.0.0 globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.16 semver: 7.6.0 - vue-eslint-parser: 9.4.2(eslint@8.57.0) + vue-eslint-parser: 9.4.2(eslint@9.0.0) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -3671,46 +3668,55 @@ packages: estraverse: 5.3.0 dev: true + /eslint-scope@8.0.1: + resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + /eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dev: true + + /eslint@9.0.0: + resolution: {integrity: sha512-IMryZ5SudxzQvuod6rUdIUz29qFItWx281VhtFVc2Psy/ZhlCeD/5DT6lBIJ4H3G+iamGJoTln1v+QSuPw0p7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/eslintrc': 3.0.2 + '@eslint/js': 9.0.0 + '@humanwhocodes/config-array': 0.12.3 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.4 - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.1 + eslint-visitor-keys: 4.0.0 + espree: 10.0.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -3723,6 +3729,15 @@ packages: - supports-color dev: true + /espree@10.0.1: + resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 4.0.0 + dev: true + /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3833,13 +3848,6 @@ packages: reusify: 1.0.4 dev: true - /file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flat-cache: 3.2.0 - dev: true - /file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -3862,15 +3870,6 @@ packages: path-exists: 4.0.0 dev: true - /flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flatted: 3.3.1 - keyv: 4.5.4 - rimraf: 3.0.2 - dev: true - /flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -4049,6 +4048,11 @@ packages: type-fest: 0.20.2 dev: true + /globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + dev: true + /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} @@ -5344,13 +5348,6 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true - /rollup@4.14.0: resolution: {integrity: sha512-Qe7w62TyawbDzB4yt32R0+AbIo6m1/sqO7UPzFS8Z/ksL5mrfhA0v4CavfdmFav3D+ub4QeAgsGEe84DoWe/nQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -6401,14 +6398,14 @@ packages: dependencies: vue: 3.4.21(typescript@5.4.3) - /vue-eslint-parser@9.4.2(eslint@8.57.0): + /vue-eslint-parser@9.4.2(eslint@9.0.0): resolution: {integrity: sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 diff --git a/src/App.vue b/src/App.vue index dbd682a..f6001d8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,7 +14,7 @@