Skip to content

Commit 2a0e2cf

Browse files
committed
chore(lint): disable prefer-importing-vitest-globals
vitest plugin ships both prefer-importing-vitest-globals (wants explicit imports) and no-importing-vitest-globals (wants globals) enabled by default, so oxlint --fix flips test files between the two warnings on every run. vitest.config sets globals: true and every test file in VueApp/src uses the globals form, so disable the prefer- rule to match the established convention.
1 parent 75ac8d1 commit 2a0e2cf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.oxlintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
],
130130
"vitest/prefer-called-times": "off", // Conflicts with prefer-called-once; toHaveBeenCalledOnce() is more readable
131131
"vitest/prefer-import-in-mock": "off", // import() form in vi.mock causes TS errors with partial class mocks
132+
"vitest/prefer-importing-vitest-globals": "off", // Directly conflicts with no-importing-vitest-globals; vitest.config sets globals:true and no test file imports
132133
"vitest/prefer-strict-boolean-matchers": "off", // Conflicts with prefer-to-be-truthy; we use .toBeTruthy()/.toBeFalsy()
133134
"vitest/require-test-timeout": "off" // Disabled intentionally; test files are not required to declare per-test timeouts
134135
}

0 commit comments

Comments
 (0)