diff --git a/examples/with-vitest/eslint.config.js b/examples/with-vitest/eslint.config.js index cc82d86..197d167 100644 --- a/examples/with-vitest/eslint.config.js +++ b/examples/with-vitest/eslint.config.js @@ -1,4 +1,5 @@ import pluginVue from 'eslint-plugin-vue' +import pluginVitest from '@vitest/eslint-plugin' import vueTsEslintConfig from '@vue/eslint-config-typescript' export default [ @@ -10,4 +11,9 @@ export default [ ...pluginVue.configs['flat/essential'], ...vueTsEslintConfig(), + + { + ...pluginVitest.configs['recommended'], + files: ['src/**/__tests__/*'], + }, ] diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 0ac7b86..415901b 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -20,6 +20,7 @@ "@types/jsdom": "^21.1.7", "@types/node": "^20.16.5", "@vitejs/plugin-vue": "^5.1.4", + "@vitest/eslint-plugin": "^1.1.6", "@vue/eslint-config-typescript": "workspace:*", "@vue/test-utils": "^2.4.6", "@vue/tsconfig": "^0.5.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8f3254..ec3b059 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -527,6 +527,9 @@ importers: '@vitejs/plugin-vue': specifier: ^5.1.4 version: 5.1.4(vite@5.4.6(@types/node@20.16.5))(vue@3.5.6(typescript@5.5.4)) + '@vitest/eslint-plugin': + specifier: ^1.1.6 + version: 1.1.6(@typescript-eslint/utils@8.6.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4)(vitest@1.6.0(@types/node@20.16.5)(jsdom@25.0.0)) '@vue/eslint-config-typescript': specifier: workspace:* version: link:../.. @@ -1750,6 +1753,17 @@ packages: vite: ^5.0.0 vue: ^3.2.25 + '@vitest/eslint-plugin@1.1.6': + resolution: {integrity: sha512-sFuAnD9iycnOzLHHhNCULXeb6ejOSo5Lcq/ODhdlUOoUrXkQPcVeYqXurZMA3neOqf+wNCQ6YuU1zyoYH/WEcg==} + peerDependencies: + '@typescript-eslint/utils': '>= 8.0' + eslint: '>= 8.57.0' + typescript: '>= 5.0.0' + vitest: '*' + peerDependenciesMeta: + typescript: + optional: true + '@vitest/expect@1.6.0': resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} @@ -5754,6 +5768,14 @@ snapshots: vite: 5.4.6(@types/node@20.16.5) vue: 3.5.6(typescript@5.5.4) + '@vitest/eslint-plugin@1.1.6(@typescript-eslint/utils@8.6.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4)(vitest@1.6.0(@types/node@20.16.5)(jsdom@25.0.0))': + dependencies: + '@typescript-eslint/utils': 8.6.0(eslint@9.10.0)(typescript@5.5.4) + eslint: 9.10.0 + vitest: 1.6.0(@types/node@20.16.5)(jsdom@25.0.0) + optionalDependencies: + typescript: 5.5.4 + '@vitest/expect@1.6.0': dependencies: '@vitest/spy': 1.6.0