1
1
import { restrictedGlobals , restrictedWorkerGlobals } from "./globals.js" ;
2
2
import { defineConfig } from "eslint-define-config" ;
3
+ import globals from "globals" ;
3
4
4
5
export default defineConfig ( {
5
6
"root" : true ,
@@ -19,8 +20,6 @@ export default defineConfig({
19
20
"eslint-plugin-sonarjs" ,
20
21
"eslint-plugin-tsdoc" ,
21
22
"eslint-plugin-unicorn" ,
22
- "eslint-plugin-vitest" ,
23
- "eslint-plugin-vitest-globals" ,
24
23
] ,
25
24
"parser" : "@typescript-eslint/parser" ,
26
25
"parserOptions" : {
@@ -86,60 +85,59 @@ export default defineConfig({
86
85
"vitest.setup.*" ,
87
86
"integration/**" ,
88
87
] ,
89
- "env" : {
90
- "vitest-globals/env" : true ,
91
- } ,
88
+ "plugins" : [ "@vitest/eslint-plugin" ] ,
89
+ "globals" : Object . fromEntries ( Object . keys ( globals . vitest ) . map ( e => [ e , true ] ) ) ,
92
90
"rules" : {
93
91
"unicorn/consistent-function-scoping" : [ 0 ] ,
94
- "vitest/consistent-test-filename" : [ 0 ] ,
95
- "vitest/consistent-test-it" : [ 0 ] ,
96
- "vitest/expect-expect" : [ 0 ] ,
97
- "vitest/max-expects" : [ 0 ] ,
98
- "vitest/max-nested-describe" : [ 0 ] ,
99
- "vitest/no-alias-methods" : [ 0 ] ,
100
- "vitest/no-commented-out-tests" : [ 0 ] ,
101
- "vitest/no-conditional-expect" : [ 0 ] ,
102
- "vitest/no-conditional-in-test" : [ 0 ] ,
103
- "vitest/no-conditional-tests" : [ 0 ] ,
104
- "vitest/no-disabled-tests" : [ 0 ] ,
105
- "vitest/no-done-callback" : [ 0 ] ,
106
- "vitest/no-duplicate-hooks" : [ 0 ] ,
107
- "vitest/no-focused-tests" : [ 0 ] ,
108
- "vitest/no-hooks" : [ 0 ] ,
109
- "vitest/no-identical-title" : [ 2 ] ,
110
- "vitest/no-interpolation-in-snapshots" : [ 0 ] ,
111
- "vitest/no-large-snapshots" : [ 0 ] ,
112
- "vitest/no-mocks-import" : [ 0 ] ,
113
- "vitest/no-restricted-matchers" : [ 0 ] ,
114
- "vitest/no-restricted-vi-methods" : [ 0 ] ,
115
- "vitest/no-standalone-expect" : [ 0 ] ,
116
- "vitest/no-test-prefixes" : [ 0 ] ,
117
- "vitest/no-test-return-statement" : [ 0 ] ,
118
- "vitest/prefer-called-with" : [ 0 ] ,
119
- "vitest/prefer-comparison-matcher" : [ 0 ] ,
120
- "vitest/prefer-each" : [ 0 ] ,
121
- "vitest/prefer-equality-matcher" : [ 0 ] ,
122
- "vitest/prefer-expect-resolves" : [ 0 ] ,
123
- "vitest/prefer-hooks-in-order" : [ 0 ] ,
124
- "vitest/prefer-hooks-on-top" : [ 2 ] ,
125
- "vitest/prefer-lowercase-title" : [ 0 ] ,
126
- "vitest/prefer-mock-promise-shorthand" : [ 0 ] ,
127
- "vitest/prefer-snapshot-hint" : [ 0 ] ,
128
- "vitest/prefer-spy-on" : [ 0 ] ,
129
- "vitest/prefer-strict-equal" : [ 0 ] ,
130
- "vitest/prefer-to-be" : [ 0 ] ,
131
- "vitest/prefer-to-be-falsy" : [ 0 ] ,
132
- "vitest/prefer-to-be-object" : [ 0 ] ,
133
- "vitest/prefer-to-be-truthy" : [ 0 ] ,
134
- "vitest/prefer-to-contain" : [ 0 ] ,
135
- "vitest/prefer-to-have-length" : [ 0 ] ,
136
- "vitest/prefer-todo" : [ 0 ] ,
137
- "vitest/require-hook" : [ 0 ] ,
138
- "vitest/require-to-throw-message" : [ 0 ] ,
139
- "vitest/require-top-level-describe" : [ 0 ] ,
140
- "vitest/valid-describe-callback" : [ 2 ] ,
141
- "vitest/valid-expect" : [ 2 ] ,
142
- "vitest/valid-title" : [ 2 ] ,
92
+ "@ vitest/consistent-test-filename" : [ 0 ] ,
93
+ "@ vitest/consistent-test-it" : [ 0 ] ,
94
+ "@ vitest/expect-expect" : [ 0 ] ,
95
+ "@ vitest/max-expects" : [ 0 ] ,
96
+ "@ vitest/max-nested-describe" : [ 0 ] ,
97
+ "@ vitest/no-alias-methods" : [ 0 ] ,
98
+ "@ vitest/no-commented-out-tests" : [ 0 ] ,
99
+ "@ vitest/no-conditional-expect" : [ 0 ] ,
100
+ "@ vitest/no-conditional-in-test" : [ 0 ] ,
101
+ "@ vitest/no-conditional-tests" : [ 0 ] ,
102
+ "@ vitest/no-disabled-tests" : [ 0 ] ,
103
+ "@ vitest/no-done-callback" : [ 0 ] ,
104
+ "@ vitest/no-duplicate-hooks" : [ 0 ] ,
105
+ "@ vitest/no-focused-tests" : [ 0 ] ,
106
+ "@ vitest/no-hooks" : [ 0 ] ,
107
+ "@ vitest/no-identical-title" : [ 2 ] ,
108
+ "@ vitest/no-interpolation-in-snapshots" : [ 0 ] ,
109
+ "@ vitest/no-large-snapshots" : [ 0 ] ,
110
+ "@ vitest/no-mocks-import" : [ 0 ] ,
111
+ "@ vitest/no-restricted-matchers" : [ 0 ] ,
112
+ "@ vitest/no-restricted-vi-methods" : [ 0 ] ,
113
+ "@ vitest/no-standalone-expect" : [ 0 ] ,
114
+ "@ vitest/no-test-prefixes" : [ 0 ] ,
115
+ "@ vitest/no-test-return-statement" : [ 0 ] ,
116
+ "@ vitest/prefer-called-with" : [ 0 ] ,
117
+ "@ vitest/prefer-comparison-matcher" : [ 0 ] ,
118
+ "@ vitest/prefer-each" : [ 0 ] ,
119
+ "@ vitest/prefer-equality-matcher" : [ 0 ] ,
120
+ "@ vitest/prefer-expect-resolves" : [ 0 ] ,
121
+ "@ vitest/prefer-hooks-in-order" : [ 0 ] ,
122
+ "@ vitest/prefer-hooks-on-top" : [ 2 ] ,
123
+ "@ vitest/prefer-lowercase-title" : [ 0 ] ,
124
+ "@ vitest/prefer-mock-promise-shorthand" : [ 0 ] ,
125
+ "@ vitest/prefer-snapshot-hint" : [ 0 ] ,
126
+ "@ vitest/prefer-spy-on" : [ 0 ] ,
127
+ "@ vitest/prefer-strict-equal" : [ 0 ] ,
128
+ "@ vitest/prefer-to-be" : [ 0 ] ,
129
+ "@ vitest/prefer-to-be-falsy" : [ 0 ] ,
130
+ "@ vitest/prefer-to-be-object" : [ 0 ] ,
131
+ "@ vitest/prefer-to-be-truthy" : [ 0 ] ,
132
+ "@ vitest/prefer-to-contain" : [ 0 ] ,
133
+ "@ vitest/prefer-to-have-length" : [ 0 ] ,
134
+ "@ vitest/prefer-todo" : [ 0 ] ,
135
+ "@ vitest/require-hook" : [ 0 ] ,
136
+ "@ vitest/require-to-throw-message" : [ 0 ] ,
137
+ "@ vitest/require-top-level-describe" : [ 0 ] ,
138
+ "@ vitest/valid-describe-callback" : [ 2 ] ,
139
+ "@ vitest/valid-expect" : [ 2 ] ,
140
+ "@ vitest/valid-title" : [ 2 ] ,
143
141
} ,
144
142
} ,
145
143
{
0 commit comments