From f0388a7e046c3be3baa364a6d9f29cab8f56870e Mon Sep 17 00:00:00 2001 From: Yue JIN Date: Wed, 20 Mar 2024 15:09:43 +0800 Subject: [PATCH] feat: introduce ESLint flat config --- .eslintrc | 14 - .prettierignore | 1 + .vscode/settings.json | 4 + README.md | 2 +- components/DialogConfirm.vue | 2 +- eslint.config.js | 16 + nuxt.config.ts | 1 + package.json | 8 +- pnpm-lock.yaml | 333 +++++++++++++----- .../__snapshots__/component.nuxt.test.ts.snap | 4 +- 10 files changed, 280 insertions(+), 105 deletions(-) delete mode 100644 .eslintrc create mode 100644 .prettierignore create mode 100644 .vscode/settings.json create mode 100644 eslint.config.js diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index db24be4..0000000 --- a/.eslintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "root": true, - "rules": { - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "vue/valid-v-slot": "off", - "prettier/prettier": "warn" - }, - "plugins": ["prettier"], - "extends": ["@nuxt/eslint-config", "plugin:prettier/recommended"] -} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..bd5535a --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +pnpm-lock.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e465243 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + // Enable the ESlint flat config support + "eslint.experimental.useFlatConfig": true +} diff --git a/README.md b/README.md index 6cae133..5a1e724 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ ### Coding Style - [Prettier](https://prettier.io/), single quotes, no semi -- [ESLint](https://eslint.org/) with adapted [@nuxt/eslint-config](https://github.com/nuxt/eslint-config) +- [ESLint flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new) with adapted [@nuxt/eslint](https://github.com/nuxt/eslint), future-proof ### Dev tools diff --git a/components/DialogConfirm.vue b/components/DialogConfirm.vue index f7299a1..68268ad 100644 --- a/components/DialogConfirm.vue +++ b/components/DialogConfirm.vue @@ -31,7 +31,7 @@ defineExpose({ open }) - $warning + {{ message }} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..cfa462a --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,16 @@ +import nuxt from './.nuxt/eslint.config.mjs' +import eslintConfigPrettier from 'eslint-config-prettier' + +export default [ + ...nuxt, + // @nuxt/eslint may disable all stylistic rules by default in the future + // https://github.com/nuxt/eslint/issues/342#issuecomment-2009005053 + // remove eslint-config-prettier at that time + eslintConfigPrettier, + { + rules: { + 'vue/valid-v-slot': 'off', + '@typescript-eslint/no-explicit-any': 'off', + }, + }, +] diff --git a/nuxt.config.ts b/nuxt.config.ts index 4b9e2bc..dba435b 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -26,6 +26,7 @@ export default defineNuxtConfig({ '@vueuse/nuxt', 'vuetify-nuxt-module', 'nuxt-auth-utils', + '@nuxt/eslint', '@nuxt/test-utils/module', ], css: ['~/assets/styles/index.css'], diff --git a/package.json b/package.json index 93cf002..263cba6 100644 --- a/package.json +++ b/package.json @@ -8,18 +8,18 @@ "generate": "nuxt generate", "postinstall": "nuxt prepare", "preview": "nuxt preview", + "prepare": "nuxt prepare", "typecheck": "nuxt typecheck", "test": "vitest", - "lint": "eslint . --fix --ignore-path .gitignore" + "lint": "eslint . --fix", + "format": "prettier . --write" }, "devDependencies": { "@mdi/js": "^7.4.47", - "@nuxt/devtools": "latest", - "@nuxt/eslint-config": "^0.2.0", + "@nuxt/eslint": "0.3.0-alpha.1", "@nuxt/test-utils": "^3.12.0", "@vue/test-utils": "^2.4.5", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", "happy-dom": "^13.9.0", "nuxt": "^3.11.1", "playwright-core": "^1.42.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c48aa6f..eb0fe9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,12 +25,9 @@ devDependencies: '@mdi/js': specifier: ^7.4.47 version: 7.4.47 - '@nuxt/devtools': - specifier: latest - version: 1.0.8(nuxt@3.11.1)(vite@5.1.6) - '@nuxt/eslint-config': - specifier: ^0.2.0 - version: 0.2.0(eslint@8.57.0) + '@nuxt/eslint': + specifier: 0.3.0-alpha.1 + version: 0.3.0-alpha.1(eslint@8.57.0)(nuxt@3.11.1)(typescript@5.4.2)(vite@5.1.6) '@nuxt/test-utils': specifier: ^3.12.0 version: 3.12.0(@vue/test-utils@2.4.5)(h3@1.11.1)(happy-dom@13.10.1)(playwright-core@1.42.1)(vite@5.1.6)(vitest@1.4.0)(vue-router@4.3.0)(vue@3.4.21) @@ -40,9 +37,6 @@ devDependencies: eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@8.57.0) - eslint-plugin-prettier: - specifier: ^5.1.3 - version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) happy-dom: specifier: ^13.9.0 version: 13.10.1 @@ -1087,19 +1081,69 @@ packages: - supports-color - utf-8-validate - /@nuxt/eslint-config@0.2.0(eslint@8.57.0): - resolution: {integrity: sha512-NeJX8TLcnNAjQFiDs3XhP+9CHKK8jaKsP7eUyCSrQdgY7nqWe7VJx64lwzx5FTT4cW3RHMEyH+Y0qzLGYYoa/A==} + /@nuxt/eslint-config@0.3.0-alpha.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-bB3X3pCnpnngea15/Xxk83wGGr/Kxop8hyD0sLkC+2q54RclLkBRLvK/hd5/tS1zjBOIZJ5mYhq63mE2biBG9w==} peerDependencies: - eslint: ^8.48.0 + eslint: ^8.56.0 dependencies: + '@eslint/js': 8.57.0 + '@nuxt/eslint-plugin': 0.3.0-alpha.1(eslint@8.57.0)(typescript@5.4.2) '@rushstack/eslint-patch': 1.7.2 - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.2) + '@stylistic/eslint-plugin': 1.7.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/eslint-plugin': 7.3.1(@typescript-eslint/parser@7.3.1)(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/parser': 7.3.1(eslint@8.57.0)(typescript@5.4.2) eslint: 8.57.0 eslint-plugin-vue: 9.23.0(eslint@8.57.0) - typescript: 5.4.2 + pathe: 1.1.2 + vue-eslint-parser: 9.4.2(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@nuxt/eslint-plugin@0.3.0-alpha.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-KYgxFMA1S3R3iUOSiZeqtdR6xjy5BZZtH3HJBi8Eqcfi6mY9GijPxy1eH8Tns6VROc6nsecIAJf2dK43akVrFQ==} + peerDependencies: + eslint: ^8.55.0 + dependencies: + '@typescript-eslint/types': 7.3.1 + '@typescript-eslint/utils': 7.3.1(eslint@8.57.0)(typescript@5.4.2) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@nuxt/eslint@0.3.0-alpha.1(eslint@8.57.0)(nuxt@3.11.1)(typescript@5.4.2)(vite@5.1.6): + resolution: {integrity: sha512-zwttUZ37pU83X96UqyAW7J50/622PlUDlKd20zIN6mbbU2YVUhM1r6vH4W65vz5LxpIchxlvPg05LE/SLE1PJQ==} + peerDependencies: + eslint: ^8.55.0 + eslint-webpack-plugin: ^4.1.0 + vite-plugin-eslint2: ^4.4.0 + peerDependenciesMeta: + eslint-webpack-plugin: + optional: true + vite-plugin-eslint2: + optional: true + dependencies: + '@nuxt/devtools-kit': 1.0.8(nuxt@3.11.1)(vite@5.1.6) + '@nuxt/eslint-config': 0.3.0-alpha.1(eslint@8.57.0)(typescript@5.4.2) + '@nuxt/eslint-plugin': 0.3.0-alpha.1(eslint@8.57.0)(typescript@5.4.2) + '@nuxt/kit': 3.11.1 + chokidar: 3.6.0 + eslint: 8.57.0 + eslint-flat-config-viewer: 0.1.11(eslint@8.57.0)(typescript@5.4.2) + get-port-please: 3.1.2 + pathe: 1.1.2 + unimport: 3.7.1(rollup@4.13.0) transitivePeerDependencies: + - bufferutil + - nuxt + - rollup - supports-color + - typescript + - utf-8-validate + - vite dev: true /@nuxt/kit@3.11.1: @@ -1467,11 +1511,6 @@ packages: requiresBuild: true optional: true - /@pkgr/core@0.1.1: - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dev: true - /@polka/url@1.0.0-next.25: resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} @@ -1745,6 +1784,78 @@ packages: resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} + /@stylistic/eslint-plugin-js@1.7.0(eslint@8.57.0): + resolution: {integrity: sha512-PN6On/+or63FGnhhMKSQfYcWutRlzOiYlVdLM6yN7lquoBTqUJHYnl4TA4MHwiAt46X5gRxDr1+xPZ1lOLcL+Q==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + '@types/eslint': 8.56.6 + acorn: 8.11.3 + escape-string-regexp: 4.0.0 + eslint: 8.57.0 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + dev: true + + /@stylistic/eslint-plugin-jsx@1.7.0(eslint@8.57.0): + resolution: {integrity: sha512-BACdBwXakQvjYIST5N2WWhRbvhRsIxa/F59BiZol+0IH4FSmDXhie7v/yaxDIIA9CbfElzOmIA5nWNYTVXcnwQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + '@stylistic/eslint-plugin-js': 1.7.0(eslint@8.57.0) + '@types/eslint': 8.56.6 + eslint: 8.57.0 + estraverse: 5.3.0 + picomatch: 4.0.1 + dev: true + + /@stylistic/eslint-plugin-plus@1.7.0(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-AabDw8sXsc70Ydx3qnbeTlRHZnIwY6UKEenBPURPhY3bfYWX+/pDpZH40HkOu94v8D0DUrocPkeeEUxl4e0JDg==} + peerDependencies: + eslint: '*' + dependencies: + '@types/eslint': 8.56.6 + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.2) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@stylistic/eslint-plugin-ts@1.7.0(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-QsHv98mmW1xaucVYQTyLDgEpybPJ/6jPPxVBrIchntWWwj74xCWKUiw79hu+TpYj/Pbhd9rkqJYLNq3pQGYuyA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + '@stylistic/eslint-plugin-js': 1.7.0(eslint@8.57.0) + '@types/eslint': 8.56.6 + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.2) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@stylistic/eslint-plugin@1.7.0(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-ThMUjGIi/jeWYNvOdjZkoLw1EOVs0tEuKXDgWvTn8uWaEz55HuPlajKxjKLpv19C+qRDbKczJfzUODfCdME53A==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + '@stylistic/eslint-plugin-js': 1.7.0(eslint@8.57.0) + '@stylistic/eslint-plugin-jsx': 1.7.0(eslint@8.57.0) + '@stylistic/eslint-plugin-plus': 1.7.0(eslint@8.57.0)(typescript@5.4.2) + '@stylistic/eslint-plugin-ts': 1.7.0(eslint@8.57.0)(typescript@5.4.2) + '@types/eslint': 8.56.6 + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@trysound/sax@0.2.0: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} @@ -1760,6 +1871,13 @@ packages: '@tufjs/canonical-json': 2.0.0 minimatch: 9.0.3 + /@types/eslint@8.56.6: + resolution: {integrity: sha512-ymwc+qb1XkjT/gfoQwxIeHZ6ixH23A+tCT2ADSA/DPVKzAjwYkTXBMCQ/f6fe4wEa85Lhp26VPeUxI7wMhAi7A==} + dependencies: + '@types/estree': 1.0.5 + '@types/json-schema': 7.0.15 + dev: true + /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -1788,23 +1906,23 @@ packages: resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: false - /@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/eslint-plugin@7.3.1(@typescript-eslint/parser@7.3.1)(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-STEDMVQGww5lhCuNXVSQfbfuNII5E08QWkvAw5Qwf+bj2WT+JkG1uc+5/vXA3AOYMDHVOSpL+9rcbEUiHIm2dw==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha - eslint: ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/visitor-keys': 6.21.0 + '@typescript-eslint/parser': 7.3.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/scope-manager': 7.3.1 + '@typescript-eslint/type-utils': 7.3.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/utils': 7.3.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/visitor-keys': 7.3.1 debug: 4.3.4 eslint: 8.57.0 graphemer: 1.4.0 @@ -1817,20 +1935,20 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/parser@7.3.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-Rq49+pq7viTRCH48XAbTA+wdLRrB/3sRq4Lpk0oGDm0VmnjBrAOVXH/Laalmwsv2VpekiEfVFwJYVk6/e8uvQw==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.2) - '@typescript-eslint/visitor-keys': 6.21.0 + '@typescript-eslint/scope-manager': 7.3.1 + '@typescript-eslint/types': 7.3.1 + '@typescript-eslint/typescript-estree': 7.3.1(typescript@5.4.2) + '@typescript-eslint/visitor-keys': 7.3.1 debug: 4.3.4 eslint: 8.57.0 typescript: 5.4.2 @@ -1846,18 +1964,26 @@ packages: '@typescript-eslint/visitor-keys': 6.21.0 dev: true - /@typescript-eslint/type-utils@6.21.0(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/scope-manager@7.3.1: + resolution: {integrity: sha512-fVS6fPxldsKY2nFvyT7IP78UO1/I2huG+AYu5AMjCT9wtl6JFiDnsv4uad4jQ0GTFzcUV5HShVeN96/17bTBag==} + engines: {node: ^18.18.0 || >=20.0.0} + dependencies: + '@typescript-eslint/types': 7.3.1 + '@typescript-eslint/visitor-keys': 7.3.1 + dev: true + + /@typescript-eslint/type-utils@7.3.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-iFhaysxFsMDQlzJn+vr3OrxN8NmdQkHks4WaqD4QBnt5hsq234wcYdyQ9uquzJJIDAj5W4wQne3yEsYA6OmXGw==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.2) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/typescript-estree': 7.3.1(typescript@5.4.2) + '@typescript-eslint/utils': 7.3.1(eslint@8.57.0)(typescript@5.4.2) debug: 4.3.4 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.2) @@ -1871,6 +1997,11 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true + /@typescript-eslint/types@7.3.1: + resolution: {integrity: sha512-2tUf3uWggBDl4S4183nivWQ2HqceOZh1U4hhu4p1tPiIJoRRXrab7Y+Y0p+dozYwZVvLPRI6r5wKe9kToF9FIw==} + engines: {node: ^18.18.0 || >=20.0.0} + dev: true + /@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.2): resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1893,6 +2024,28 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@7.3.1(typescript@5.4.2): + resolution: {integrity: sha512-tLpuqM46LVkduWP7JO7yVoWshpJuJzxDOPYIVWUUZbW+4dBpgGeUdl/fQkhuV0A8eGnphYw3pp8d2EnvPOfxmQ==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 7.3.1 + '@typescript-eslint/visitor-keys': 7.3.1 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.0 + ts-api-utils: 1.3.0(typescript@5.4.2) + typescript: 5.4.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1912,6 +2065,25 @@ packages: - typescript dev: true + /@typescript-eslint/utils@7.3.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-jIERm/6bYQ9HkynYlNZvXpzmXWZGhMbrOvq3jJzOSOlKXsVjrrolzWBjDW6/TvT5Q3WqaN4EkmcfdQwi9tDjBQ==} + 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) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 7.3.1 + '@typescript-eslint/types': 7.3.1 + '@typescript-eslint/typescript-estree': 7.3.1(typescript@5.4.2) + eslint: 8.57.0 + semver: 7.6.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@6.21.0: resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1920,6 +2092,14 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@7.3.1: + resolution: {integrity: sha512-9RMXwQF8knsZvfv9tdi+4D/j7dMG28X/wMJ8Jj6eOHyHWwDW4ngQJcqEczSsqIKKjFiLFr40Mnr7a5ulDD3vmw==} + engines: {node: ^18.18.0 || >=20.0.0} + dependencies: + '@typescript-eslint/types': 7.3.1 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -3242,25 +3422,30 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5): - resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} - engines: {node: ^14.18.0 || >=16.0.0} + /eslint-flat-config-viewer@0.1.11(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-yPLqlKJrz5LX2H3IG9iXAMr5tsqgXkZ8HGwr8qZGlPgWy5GEhmmUTAWOGfP3FT26jk4Qrx5VsYXAv9M8JCpmYw==} + hasBin: true peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '*' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true + eslint: ^8.50.0 dependencies: + '@unhead/shared': 1.8.20 + '@unhead/ssr': 1.8.20 + chokidar: 3.6.0 + consola: 3.2.3 + devalue: 4.3.2 eslint: 8.57.0 - eslint-config-prettier: 9.1.0(eslint@8.57.0) - prettier: 3.2.5 - prettier-linter-helpers: 1.0.0 - synckit: 0.8.8 + get-port-please: 3.1.2 + jiti: 1.21.0 + ofetch: 1.3.3 + open: 10.1.0 + unhead: 1.8.20 + vue: 3.4.21(typescript@5.4.2) + vue-bundle-renderer: 2.0.0 + ws: 8.16.0 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate dev: true /eslint-plugin-vue@9.23.0(eslint@8.57.0): @@ -3433,10 +3618,6 @@ packages: /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - /fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - dev: true - /fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} @@ -5047,6 +5228,11 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + /picomatch@4.0.1: + resolution: {integrity: sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==} + engines: {node: '>=12'} + dev: true + /pinia@2.1.7(typescript@5.4.2)(vue@3.4.21): resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==} peerDependencies: @@ -5355,13 +5541,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - /prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - dependencies: - fast-diff: 1.3.0 - dev: true - /prettier@3.2.5: resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} engines: {node: '>=14'} @@ -5949,14 +6128,6 @@ packages: csso: 5.0.5 picocolors: 1.0.0 - /synckit@0.8.8: - resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} - engines: {node: ^14.18.0 || >=16.0.0} - dependencies: - '@pkgr/core': 0.1.1 - tslib: 2.6.2 - dev: true - /system-architecture@0.1.0: resolution: {integrity: sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==} engines: {node: '>=18'} @@ -6047,10 +6218,6 @@ packages: resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} dev: false - /tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - dev: true - /tuf-js@2.2.0: resolution: {integrity: sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg==} engines: {node: ^16.14.0 || >=18.0.0} diff --git a/tests/__snapshots__/component.nuxt.test.ts.snap b/tests/__snapshots__/component.nuxt.test.ts.snap index 97f45a3..e946427 100644 --- a/tests/__snapshots__/component.nuxt.test.ts.snap +++ b/tests/__snapshots__/component.nuxt.test.ts.snap @@ -23,11 +23,11 @@ exports[`component DialogConfirm.vue > should open and close 1`] = ` message