Skip to content

Commit

Permalink
test: use @vitest/eslint-plugin (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
kretajak authored Nov 10, 2024
1 parent bb8fe84 commit e65fd89
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 94 deletions.
16 changes: 10 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"prettier",
"react-hooks",
"import",
"vitest",
"@vitest",
"testing-library",
"eslint-plugin-react-compiler"
],
Expand Down Expand Up @@ -53,10 +53,6 @@
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"vitest/consistent-test-it": [
"error",
{ "fn": "it", "withinDescribe": "it" }
],
"import/order": [
"error",
{
Expand Down Expand Up @@ -110,10 +106,18 @@
},
"overrides": [
{
"extends": ["plugin:testing-library/react"],
"extends": [
"plugin:testing-library/react",
"plugin:@vitest/legacy-recommended"
],
"files": ["tests/**/*.ts", "tests/**/*.tsx"],
"rules": {
"import/extensions": ["error", "never"],
"@vitest/expect-expect": "off",
"@vitest/consistent-test-it": [
"error",
{ "fn": "it", "withinDescribe": "it" }
],
"@typescript-eslint/no-unused-vars": "off"
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"@vitest/coverage-v8": "^2.1.4",
"@vitest/eslint-plugin": "^1.1.7",
"@vitest/ui": "^2.1.4",
"esbuild": "^0.24.0",
"eslint": "8.57.0",
Expand All @@ -129,7 +130,6 @@
"eslint-plugin-react-compiler": "19.0.0-beta-8a03594-20241020",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-testing-library": "^6.4.0",
"eslint-plugin-vitest": "^0.5.4",
"jest-leak-detector": "^29.7.0",
"jsdom": "^25.0.1",
"json": "^11.0.0",
Expand Down
106 changes: 22 additions & 84 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/proxyMap.bench.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable vitest/consistent-test-it */
import { bench, describe, test } from 'vitest'
import { proxy, snapshot } from 'valtio'
/* eslint-disable @vitest/consistent-test-it */
import { bench, describe } from 'vitest'
import { snapshot } from 'valtio'
import { proxyMap } from 'valtio/utils'

// Helper function to generate test data
Expand Down

0 comments on commit e65fd89

Please sign in to comment.