-
-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linter: valid_describe_callback
should not execute in Vitest
#9060
Comments
@camchenry Should we split the rules for jest / vitest? |
@Sysix Could we use the framework flags to detect if we're running in a file that uses vitest? Would be nice to do something like |
Framework flags are not safe, see: #8165 (comment) I would like to have a rule extending another one, then we have only the rules object duplicated EDIT: I am also happy with the option to go the vitest way and ignore jest |
@Sysix could we add a config option here to change the behavior maybe? Like a boolean to allow or disallow async describe callbacks. |
@camchenry maybe. |
I have enabled Vitest was originally designed to replace Jest and aligned its API with Jest. However, it is expected to develop more unique features for now and in the future. Sharing rules between Jest and Vitest may lead to increasing complexity. IMO is that it would be better to create separate rules for each while extracting common parts into utility files when necessary. |
@Sysix I feel like the simplest way to resolve this is to split the rules. I think we can only claim that a rule is Vitest+Jest compatible is if it doesn't have any significant differences, but that doesn't seem to be true in this case anymore. |
Can I handle this (Work to separate vitest and jest rules)? I’ve made a few oxlint rules and want to try something a bit bigger. |
What version of Oxlint are you using?
0.15.10
What command did you run?
oxlint -c=../../../.oxlintrc.json
What does your
.oxlintrc.json
config file look like?What happened?
oxlint reports below error.
However, I believe that Vitest does not need to report this because it supports async functions for
describe
.ref: vitest-dev/vitest#703 (comment)
The text was updated successfully, but these errors were encountered: