Skip to content

Commit 86fa667

Browse files
committed
fix(linter/plugins): improve type def for RuleMeta defaultOptions property (#16159)
Constrain `RuleMeta`'s `defaultOptions` property to be `JSON.stringify`-able data.
1 parent fa3b070 commit 86fa667

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/oxlint/src-js/plugins/rule_meta.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { Options } from "./options.ts";
2+
13
/**
24
* Rule metadata.
35
* `meta` property of `Rule`.
@@ -43,9 +45,8 @@ export interface RuleMeta {
4345
* Default options for the rule.
4446
* If present, any user-provided options in their config will be merged on top of them recursively.
4547
*/
46-
// TODO: Make this more precise.
4748
// TODO: Use this to alter options passed to rules.
48-
defaultOptions?: unknown[];
49+
defaultOptions?: Options;
4950
/**
5051
* Indicates whether the rule has been deprecated, and info about the deprecation and possible replacements.
5152
*/

0 commit comments

Comments
 (0)