Skip to content

Commit 37ca4cb

Browse files
silverwindlunnywxiaoguang
authored
Remove vitest globals (#21505)
Explicitly import them instead which is cleaner and enables better editor integration. Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
1 parent e27d52b commit 37ca4cb

File tree

5 files changed

+3
-4
lines changed

5 files changed

+3
-4
lines changed

.eslintrc.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ overrides:
3535
rules:
3636
import/no-unresolved: [0]
3737
import/no-extraneous-dependencies: [0]
38-
- files: ["*.test.js"]
39-
env:
40-
jest: true
4138
- files: ["*.config.js"]
4239
rules:
4340
import/no-unused-modules: [0]

vitest.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export default defineConfig({
2424
open: false,
2525
allowOnly: true,
2626
passWithNoTests: true,
27-
globals: true,
2827
watch: false,
2928
},
3029
plugins: [

web_src/js/features/repo-findfile.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {describe, expect, test} from 'vitest';
12
import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted} from './repo-findfile.js';
23

34
describe('Repo Find Files', () => {

web_src/js/svg.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {expect, test} from 'vitest';
12
import {svg} from './svg.js';
23

34
test('svg', () => {

web_src/js/utils.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {expect, test} from 'vitest';
12
import {
23
basename, extname, isObject, uniq, stripTags, joinPaths, parseIssueHref,
34
prettyNumber, parseUrl,

0 commit comments

Comments
 (0)