Skip to content

Commit

Permalink
refactor: move vitest-plugin to @vitest/eslint-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Aug 11, 2024
1 parent 33a2eed commit 707fe97
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 94 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-coins-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/eslint-config-hyperse": patch
---

move `vitest-plugin` to @vitest/eslint-plugin
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,27 @@
],
"scripts": {
"build": "tsx ./scripts/build.ts",
"changeset": "changeset",
"clean": "rimraf --no-glob ./dist ./coverage ./.eslintcache ./tsconfig.tsbuildinfo",
"test": "vitest run",
"cz": "cz",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"typecheck": "tsc --project ./tsconfig.json --noEmit",
"lint-staged-files": "lint-staged --allow-empty",
"changeset": "changeset",
"version": "changeset version",
"lint:fix": "npm run lint -- --fix",
"prepare": "husky",
"release": "yarn run build && changeset publish",
"cz": "cz",
"prepare": "husky"
"test": "vitest run",
"typecheck": "tsc --project ./tsconfig.json --noEmit",
"version": "changeset version"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"dependencies": {
"@eslint/js": "^9.8.0",
"@eslint/js": "^9.9.0",
"@next/eslint-plugin-next": "rc",
"@vitest/eslint-plugin": "^1.0.0",
"app-root-path": "^3.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-define-config": "^2.1.0",
Expand All @@ -82,7 +83,6 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sonarjs": "^1.0.4",
"eslint-plugin-tailwindcss": "^3.17.4",
"eslint-plugin-vitest-2": "^0.6.1",
"get-tsconfig": "^4.7.6",
"globals": "^15.9.0",
"prettier": "^3.3.3",
Expand All @@ -94,13 +94,13 @@
"@changesets/cli": "2.27.7",
"@commitlint/cli": "19.4.0",
"@commitlint/config-conventional": "19.2.2",
"@swc/core": "^1.7.6",
"@swc/core": "^1.7.10",
"@types/eslint__js": "^8.42.3",
"@types/node": "22.1.0",
"@types/node": "22.2.0",
"@types/react": "^18.3.3",
"commitizen": "4.3.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "^9.8.0",
"eslint": "^9.9.0",
"husky": "9.1.4",
"lint-staged": "15.2.8",
"rimraf": "6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/vitest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineFlatConfig } from 'eslint-define-config';
import pluginVitest from 'eslint-plugin-vitest-2';
import pluginVitest from '@vitest/eslint-plugin';

const vitestPatterns = {
files: ['**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
Expand Down
167 changes: 86 additions & 81 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -896,10 +896,10 @@ __metadata:
languageName: node
linkType: hard

"@eslint/js@npm:9.8.0, @eslint/js@npm:^9.8.0":
version: 9.8.0
resolution: "@eslint/js@npm:9.8.0"
checksum: 10/1c6ddbcc9f45f0165d9e218c085543536c03b4b650449a6f38f4e2b65b1d6bcd5f24f7feae72fca14d3697073cbdb413f270baef0f744cb0fb9e11ce9c84dbcc
"@eslint/js@npm:9.9.0, @eslint/js@npm:^9.9.0":
version: 9.9.0
resolution: "@eslint/js@npm:9.9.0"
checksum: 10/9d6e94d0334aecaa7e5c78e654297d9b11679f56c8ec1b64db122cbecf64b5a04138617e901d0c79727d03abce8a898cce4288259435bde78460ebdab202998f
languageName: node
linkType: hard

Expand Down Expand Up @@ -932,16 +932,17 @@ __metadata:
"@changesets/cli": "npm:2.27.7"
"@commitlint/cli": "npm:19.4.0"
"@commitlint/config-conventional": "npm:19.2.2"
"@eslint/js": "npm:^9.8.0"
"@eslint/js": "npm:^9.9.0"
"@next/eslint-plugin-next": "npm:rc"
"@swc/core": "npm:^1.7.6"
"@swc/core": "npm:^1.7.10"
"@types/eslint__js": "npm:^8.42.3"
"@types/node": "npm:22.1.0"
"@types/node": "npm:22.2.0"
"@types/react": "npm:^18.3.3"
"@vitest/eslint-plugin": "npm:^1.0.0"
app-root-path: "npm:^3.1.0"
commitizen: "npm:4.3.0"
cz-conventional-changelog: "npm:3.3.0"
eslint: "npm:^9.8.0"
eslint: "npm:^9.9.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-define-config: "npm:^2.1.0"
eslint-plugin-jsonc: "npm:^2.16.0"
Expand All @@ -953,7 +954,6 @@ __metadata:
eslint-plugin-simple-import-sort: "npm:^12.1.1"
eslint-plugin-sonarjs: "npm:^1.0.4"
eslint-plugin-tailwindcss: "npm:^3.17.4"
eslint-plugin-vitest-2: "npm:^0.6.1"
get-tsconfig: "npm:^4.7.6"
globals: "npm:^15.9.0"
husky: "npm:9.1.4"
Expand Down Expand Up @@ -1314,90 +1314,90 @@ __metadata:
languageName: node
linkType: hard

"@swc/core-darwin-arm64@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-darwin-arm64@npm:1.7.6"
"@swc/core-darwin-arm64@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-darwin-arm64@npm:1.7.10"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@swc/core-darwin-x64@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-darwin-x64@npm:1.7.6"
"@swc/core-darwin-x64@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-darwin-x64@npm:1.7.10"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@swc/core-linux-arm-gnueabihf@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.7.6"
"@swc/core-linux-arm-gnueabihf@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.7.10"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard

"@swc/core-linux-arm64-gnu@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-linux-arm64-gnu@npm:1.7.6"
"@swc/core-linux-arm64-gnu@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-linux-arm64-gnu@npm:1.7.10"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard

"@swc/core-linux-arm64-musl@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-linux-arm64-musl@npm:1.7.6"
"@swc/core-linux-arm64-musl@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-linux-arm64-musl@npm:1.7.10"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard

"@swc/core-linux-x64-gnu@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-linux-x64-gnu@npm:1.7.6"
"@swc/core-linux-x64-gnu@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-linux-x64-gnu@npm:1.7.10"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard

"@swc/core-linux-x64-musl@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-linux-x64-musl@npm:1.7.6"
"@swc/core-linux-x64-musl@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-linux-x64-musl@npm:1.7.10"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard

"@swc/core-win32-arm64-msvc@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-win32-arm64-msvc@npm:1.7.6"
"@swc/core-win32-arm64-msvc@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-win32-arm64-msvc@npm:1.7.10"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@swc/core-win32-ia32-msvc@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-win32-ia32-msvc@npm:1.7.6"
"@swc/core-win32-ia32-msvc@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-win32-ia32-msvc@npm:1.7.10"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard

"@swc/core-win32-x64-msvc@npm:1.7.6":
version: 1.7.6
resolution: "@swc/core-win32-x64-msvc@npm:1.7.6"
"@swc/core-win32-x64-msvc@npm:1.7.10":
version: 1.7.10
resolution: "@swc/core-win32-x64-msvc@npm:1.7.10"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"@swc/core@npm:^1.7.6":
version: 1.7.6
resolution: "@swc/core@npm:1.7.6"
"@swc/core@npm:^1.7.10":
version: 1.7.10
resolution: "@swc/core@npm:1.7.10"
dependencies:
"@swc/core-darwin-arm64": "npm:1.7.6"
"@swc/core-darwin-x64": "npm:1.7.6"
"@swc/core-linux-arm-gnueabihf": "npm:1.7.6"
"@swc/core-linux-arm64-gnu": "npm:1.7.6"
"@swc/core-linux-arm64-musl": "npm:1.7.6"
"@swc/core-linux-x64-gnu": "npm:1.7.6"
"@swc/core-linux-x64-musl": "npm:1.7.6"
"@swc/core-win32-arm64-msvc": "npm:1.7.6"
"@swc/core-win32-ia32-msvc": "npm:1.7.6"
"@swc/core-win32-x64-msvc": "npm:1.7.6"
"@swc/core-darwin-arm64": "npm:1.7.10"
"@swc/core-darwin-x64": "npm:1.7.10"
"@swc/core-linux-arm-gnueabihf": "npm:1.7.10"
"@swc/core-linux-arm64-gnu": "npm:1.7.10"
"@swc/core-linux-arm64-musl": "npm:1.7.10"
"@swc/core-linux-x64-gnu": "npm:1.7.10"
"@swc/core-linux-x64-musl": "npm:1.7.10"
"@swc/core-win32-arm64-msvc": "npm:1.7.10"
"@swc/core-win32-ia32-msvc": "npm:1.7.10"
"@swc/core-win32-x64-msvc": "npm:1.7.10"
"@swc/counter": "npm:^0.1.3"
"@swc/types": "npm:^0.1.12"
peerDependencies:
Expand Down Expand Up @@ -1426,7 +1426,7 @@ __metadata:
peerDependenciesMeta:
"@swc/helpers":
optional: true
checksum: 10/09a089e3d9db118a6d6c4ead90364ae2ce8581a893e4c4c95db135431abf74c1d8d58558c27e557d2d7822bb3c25a114f4ed5cdd8465465d84733416a2c49d87
checksum: 10/bff2fdfeea535bb5db7b0892fd1d3cc1dc68477d5ed4a23491106180f3f3cccddd1f0a8309a02f483732127c9b3afbbb46fb689a6dc56b584cae3b398a7cb445
languageName: node
linkType: hard

Expand Down Expand Up @@ -1565,12 +1565,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:*, @types/node@npm:22.1.0":
version: 22.1.0
resolution: "@types/node@npm:22.1.0"
"@types/node@npm:*, @types/node@npm:22.2.0":
version: 22.2.0
resolution: "@types/node@npm:22.2.0"
dependencies:
undici-types: "npm:~6.13.0"
checksum: 10/c2ac1340509646b6c673b27fae2a46e501a97e540e7221be4dd2e0be7a0f61efefb5bf3be8bedf2dbce245fa49cfc49bba77bce73fa3c4296d0d19521ced3222
checksum: 10/2957c5c81f1a07a1210f28382adae65c11070c301e395fa819448516f1a2a710054b29e0ec7d8e28624afbcd90dae810403a497109545dea835b554fc76edf6c
languageName: node
linkType: hard

Expand Down Expand Up @@ -1751,6 +1751,25 @@ __metadata:
languageName: node
linkType: hard

"@vitest/eslint-plugin@npm:^1.0.0":
version: 1.0.0
resolution: "@vitest/eslint-plugin@npm:1.0.0"
peerDependencies:
"@typescript-eslint/utils": ">= 7.8 || 8.0.0"
eslint: ">= 8.57.0"
typescript: ">= 5.0.0"
vitest: "*"
peerDependenciesMeta:
"@typescript-eslint/utils":
optional: true
typescript:
optional: true
vitest:
optional: true
checksum: 10/db4bda59243329d27f880b53f094cd3a455f54770ccd7dc751237f12cca21114499d9a46871a8abfa59c6ea4e3a22014e894274b49e21f30beb912225cae1849
languageName: node
linkType: hard

"@vitest/expect@npm:2.0.5":
version: 2.0.5
resolution: "@vitest/expect@npm:2.0.5"
Expand Down Expand Up @@ -3564,25 +3583,6 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-vitest-2@npm:^0.6.1":
version: 0.6.1
resolution: "eslint-plugin-vitest-2@npm:0.6.1"
peerDependencies:
"@typescript-eslint/utils": ">= 7.8 || 8.0.0"
eslint: ">= 8.57.0"
typescript: ">= 5.0.0"
vitest: "*"
peerDependenciesMeta:
"@typescript-eslint/utils":
optional: true
typescript:
optional: true
vitest:
optional: true
checksum: 10/879dee0b325bb518e8e8a0cf904da0f346ba6399208b7f0cabb94485647f833eb42522e43768daf526c9172657ef68f0e446de64a05d4f2bf79af4614406fcee
languageName: node
linkType: hard

"eslint-scope@npm:^8.0.2":
version: 8.0.2
resolution: "eslint-scope@npm:8.0.2"
Expand All @@ -3607,15 +3607,15 @@ __metadata:
languageName: node
linkType: hard

"eslint@npm:^9.8.0":
version: 9.8.0
resolution: "eslint@npm:9.8.0"
"eslint@npm:^9.9.0":
version: 9.9.0
resolution: "eslint@npm:9.9.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.2.0"
"@eslint-community/regexpp": "npm:^4.11.0"
"@eslint/config-array": "npm:^0.17.1"
"@eslint/eslintrc": "npm:^3.1.0"
"@eslint/js": "npm:9.8.0"
"@eslint/js": "npm:9.9.0"
"@humanwhocodes/module-importer": "npm:^1.0.1"
"@humanwhocodes/retry": "npm:^0.3.0"
"@nodelib/fs.walk": "npm:^1.2.8"
Expand Down Expand Up @@ -3645,9 +3645,14 @@ __metadata:
optionator: "npm:^0.9.3"
strip-ansi: "npm:^6.0.1"
text-table: "npm:^0.2.0"
peerDependencies:
jiti: "*"
peerDependenciesMeta:
jiti:
optional: true
bin:
eslint: bin/eslint.js
checksum: 10/b1dd864170ca359249c92d1d8e09a628497efcf8a4293b571308460125fb0367a15612b2b0f135ff21b92453bf324ce75843fcaac3e01734f4bee2ff79919cc3
checksum: 10/88616421c9cb873d8f116d1ef6aa665cc898d35361351739c8041f11c30fe004bcfa641a2b6074655393eac7e7e5f9a661675dd1c01a24cf1e65cc6b556e06b3
languageName: node
linkType: hard

Expand Down

0 comments on commit 707fe97

Please sign in to comment.