Skip to content

Commit d959ab9

Browse files
committed
Update to renamed vitest plugin
1 parent e8edb27 commit d959ab9

File tree

7 files changed

+83
-216
lines changed

7 files changed

+83
-216
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ All peer dependencies used by `@code-pushup/eslint-config` are listed below, alo
8282
| ![typescript](./docs/icons/material/typescript.png) | [typescript-eslint](https://www.npmjs.com/package/typescript-eslint) | `^8.0.0` ||
8383
| ![graphql](./docs/icons/material/graphql.png) | [@graphql-eslint/eslint-plugin](https://www.npmjs.com/package/@graphql-eslint/eslint-plugin) | `^3.0.0` | |
8484
| ![ngrx](./docs/icons/other/ngrx.png) | [@ngrx/eslint-plugin](https://www.npmjs.com/package/@ngrx/eslint-plugin) | `^18.0.0 \|\| ^19.0.0` | |
85+
| ![vitest](./docs/icons/material/vitest.png) | [@vitest/eslint-plugin](https://www.npmjs.com/package/@vitest/eslint-plugin) | `^1.0.0` | |
8586
| ![angular](./docs/icons/material/angular.png) | [angular-eslint](https://www.npmjs.com/package/angular-eslint) | `^18.0.0 \|\| ^19.0.0` | |
8687
| ![cypress](./docs/icons/material/cypress.png) | [eslint-plugin-cypress](https://www.npmjs.com/package/eslint-plugin-cypress) | `>=3.3.0` | |
8788
| ![jest](./docs/icons/material/jest.png) | [eslint-plugin-jest](https://www.npmjs.com/package/eslint-plugin-jest) | `^28.8.0` | |
@@ -94,7 +95,6 @@ All peer dependencies used by `@code-pushup/eslint-config` are listed below, alo
9495
| ![rxjs](./docs/icons/other/rxjs.png) | [eslint-plugin-rxjs-x](https://www.npmjs.com/package/eslint-plugin-rxjs-x) | `>=0.6.0` | |
9596
| ![storybook](./docs/icons/material/storybook.png) | [eslint-plugin-storybook](https://www.npmjs.com/package/eslint-plugin-storybook) | `>=0.10.0` | |
9697
| ![testing-library](./docs/icons/other/testing-library.png) | [eslint-plugin-testing-library](https://www.npmjs.com/package/eslint-plugin-testing-library) | `^7.1.1` | |
97-
| ![vitest](./docs/icons/material/vitest.png) | [eslint-plugin-vitest](https://www.npmjs.com/package/eslint-plugin-vitest) | `>=0.5.0` | |
9898

9999
### 🧪 Test overrides
100100

docs/vitest.md

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 26 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@eslint/js": "^9.0.0",
4949
"@graphql-eslint/eslint-plugin": "^3.0.0",
5050
"@ngrx/eslint-plugin": "^18.0.0 || ^19.0.0",
51+
"@vitest/eslint-plugin": "^1.0.0",
5152
"angular-eslint": "^18.0.0 || ^19.0.0",
5253
"eslint": "^9.0.0",
5354
"eslint-import-resolver-typescript": "^3.0.0",
@@ -67,7 +68,6 @@
6768
"eslint-plugin-storybook": ">=0.10.0",
6869
"eslint-plugin-testing-library": "^7.1.1",
6970
"eslint-plugin-unicorn": ">=50.0.0",
70-
"eslint-plugin-vitest": ">=0.5.0",
7171
"globals": ">=14.0.0",
7272
"typescript-eslint": "^8.0.0"
7373
},
@@ -78,6 +78,9 @@
7878
"@ngrx/eslint-plugin": {
7979
"optional": true
8080
},
81+
"@vitest/eslint-plugin": {
82+
"optional": true
83+
},
8184
"angular-eslint": {
8285
"optional": true
8386
},
@@ -116,9 +119,6 @@
116119
},
117120
"eslint-plugin-testing-library": {
118121
"optional": true
119-
},
120-
"eslint-plugin-vitest": {
121-
"optional": true
122122
}
123123
},
124124
"devDependencies": {
@@ -128,6 +128,7 @@
128128
"@types/eslint__js": "^8.42.3",
129129
"@typescript-eslint/types": "^8.13.0",
130130
"@vitest/coverage-v8": "^2.1.4",
131+
"@vitest/eslint-plugin": "^1.1.31",
131132
"angular-eslint": "^19.0.2",
132133
"build-md": "^0.4.1",
133134
"compare-versions": "^6.1.0",
@@ -149,7 +150,6 @@
149150
"eslint-plugin-storybook": "^0.11.2",
150151
"eslint-plugin-testing-library": "^7.1.1",
151152
"eslint-plugin-unicorn": "^56.0.1",
152-
"eslint-plugin-vitest": "^0.5.4",
153153
"globals": "^15.12.0",
154154
"graphql": "^16.9.0",
155155
"husky": "^8.0.0",

scripts/docs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ async function loadPeerDependencies(configs) {
7575
return (
7676
plugins.includes(pkg) ||
7777
plugins.includes(alias) ||
78+
plugins.includes(alias.replace(/^@/, '')) ||
7879
plugins.map(plugin => plugin.replace(/^@/, '')).includes(alias)
7980
);
8081
},

scripts/helpers/plugins.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const pluginIcons = {
88
'@ngrx': 'other/ngrx',
99
'@rx-angular': 'other/rx-angular',
1010
'@typescript-eslint': 'material/typescript',
11+
'@vitest': 'material/vitest',
1112
cypress: 'material/cypress',
1213
deprecation: 'icons8/expired',
1314
functional: 'icons8/lambda',
@@ -40,6 +41,7 @@ const pluginDocsUrls = {
4041
'@ngrx': 'https://ngrx.io/guide/eslint-plugin',
4142
'@rx-angular': 'https://www.rx-angular.io/docs/eslint-plugin',
4243
'@typescript-eslint': 'https://typescript-eslint.io/',
44+
'@vitest': 'https://github.com/veritem/eslint-plugin-vitest#readme',
4345
cypress: 'https://github.com/cypress-io/eslint-plugin-cypress#readme',
4446
deprecation: 'https://github.com/gund/eslint-plugin-deprecation#readme',
4547
functional:

src/configs/vitest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22

3+
import vitest from '@vitest/eslint-plugin';
34
import * as jestFormatting from 'eslint-plugin-jest-formatting';
4-
import vitest from 'eslint-plugin-vitest';
55
import tseslint from 'typescript-eslint';
66
import { UNIT_TEST_FILE_PATTERNS } from '../lib/patterns.js';
77
import { convertErrorsToWarnings } from '../lib/utils.js';
@@ -34,7 +34,7 @@ export default tseslint.config({
3434
{
3535
name: 'code-pushup/vitest/additional',
3636
rules: {
37-
// https://github.com/veritem/eslint-plugin-vitest#rules
37+
// https://github.com/vitest-dev/eslint-plugin-vitest#rules
3838
'vitest/consistent-test-filename': [
3939
'warn',
4040
{ pattern: String.raw`.*\.spec\.[tj]sx?$` },

0 commit comments

Comments
 (0)