From 76a54fcf33bae5737a882183f675126e683a6229 Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Thu, 3 Oct 2024 20:39:30 +0200 Subject: [PATCH] add recommended vitest rules to ESLint --- eslint.config.mjs | 2 ++ package.json | 1 + yarn.lock | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index de56b94..7003677 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,3 +1,4 @@ +import vitestPlugin from '@vitest/eslint-plugin' import importPlugin from 'eslint-plugin-import' import typescriptPlugin from 'typescript-eslint' @@ -10,6 +11,7 @@ export default typescriptPlugin.config( }, typescriptPlugin.configs.base, importPlugin.configs.typescript, + vitestPlugin.configs.recommended, { plugins: { import: importPlugin, diff --git a/package.json b/package.json index a31f800..350af87 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "@rollup/plugin-node-resolve": "^15.3.0", "@rollup/plugin-typescript": "^12.1.0", "@vitest/coverage-v8": "^2.1.1", + "@vitest/eslint-plugin": "^1.1.5", "babel-plugin-annotate-pure-calls": "^0.4.0", "babel-plugin-polyfill-regenerator": "^0.6.2", "eslint": "^9.11.1", diff --git a/yarn.lock b/yarn.lock index 35fb872..ba49abe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1499,6 +1499,11 @@ test-exclude "^7.0.1" tinyrainbow "^1.2.0" +"@vitest/eslint-plugin@^1.1.5": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@vitest/eslint-plugin/-/eslint-plugin-1.1.5.tgz#f81502fa1bf8d69d9a681cd86c02f568f6f9c438" + integrity sha512-a02F1HAJ/A1ietP96QDxkRqZROdgCJvNXSkmHAXTcTHnmj9Hh2gqi7x4M+miOj1sDIef2qGqE8zmMBb2PgTE8w== + "@vitest/expect@2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-2.1.1.tgz#907137a86246c5328929d796d741c4e95d1ee19d"