Skip to content

Commit ef54d89

Browse files
handle null context options in oxlint compat path
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
1 parent a1cc882 commit ef54d89

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

eslint-rules/prefer-dispose-in-tests.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,12 @@ const preferDisposeInTestsRule = {
437437
},
438438
},
439439
createOnce(context) {
440+
const userOptions = Array.isArray(context.options)
441+
? (context.options[0] ?? {})
442+
: (context.options ?? {})
440443
const options = {
441444
...DEFAULT_OPTIONS,
442-
...(context.options[0] ?? {}),
445+
...userOptions,
443446
}
444447
const state = {
445448
sourceCode: context.sourceCode,

0 commit comments

Comments
 (0)