You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So there are effectively two styles: one where globals are manually imported per test file, and one where they are not. It would make sense to have a rule that covered the latter style and detected imports of globals from 'vitest' in test files.
The text was updated successfully, but these errors were encountered:
@veritem looking at jest-eslint they have a rule for one side of this: prefer-importing-jest-globals, but not the other, meaning they have a rule to enforce the presence of jest globals, but not one to enforce their absence. Would you be happy with two different rules:
By default eslint will flag vitest globals that aren't imported (
describe
,expect
) etc as errors because they violate theno-undef
rule:We can prevent this using :
Or for flat file config:
So there are effectively two styles: one where globals are manually imported per test file, and one where they are not. It would make sense to have a rule that covered the latter style and detected imports of globals from 'vitest' in test files.
The text was updated successfully, but these errors were encountered: