-
-
Notifications
You must be signed in to change notification settings - Fork 736
Labels
A-linterArea - LinterArea - Linter
Description
What version of Oxlint are you using?
1.31.0
What command did you run?
oxlint --type-aware
What does your .oxlintrc.json config file look like?
What happened?
Good day,
I am using some helper test functions in my test like test_previous and test_next I was getting an error that expect is not in the test. I have realized that I need to tell the linter which of my helper functions have expect in them.
Docs regarding this rule only mention assertFunctionNamesJest and assertFunctionNamesVitest. I have tried adding those helper functions into assertFunctionNamesJest, but that didn't work. (Might even be a separate bug)
Solution was to use just assertFunctionNames option. Which is not mentioned in the docs at all.
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter
{ "plugins": [ "typescript", "unicorn", "react", "react-perf", "oxc", "import", "promise", "vitest" ], "ignorePatterns": [ "node_modules", "dist/**", "packages/protocol/dist/**", "packages/log-translator/dist/**" ], "rules": { "jest/expect-expect": [ "warn", { "assertFunctionNames": [ "expect", "test_text_with_page", "test_previous", "test_next", "test_pre_ellipsis", "test_post_ellipsis" ] } ], "jest/no-standalone-expect": [ "error", { "additionalTestBlockFunctions": ["test.for"] } ], "typescript/unbound-method": "off", "typescript/no-floating-promises": "off", "typescript/no-redundant-type-constituents": "off" } }