Skip to content

Commit

Permalink
Fix types of rule arguments
Browse files Browse the repository at this point in the history
Closes GH-289.

Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
jablko authored Apr 4, 2022
1 parent a3f5b01 commit d1e24ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/unified-lint-rule/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function lintRule<Tree extends Node = Node, Options = unknown>(
name: string | RuleMeta,
rule: Rule<Tree, Options>
): Plugin<
void[] | [Options | Label | Severity] | [boolean | Label | Severity, Options],
void[] | [Options | [boolean | Label | Severity, (Options | undefined)?]],
Tree
>

Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ remark()
.use(remarkLintUnorderedListMarkerStyle, '*')
.use(remarkLintUnorderedListMarkerStyle, ['on', '*'])
.use(remarkLintUnorderedListMarkerStyle, [1, '*'])
// The following rule accepts a number, numbers *must* be passed in arrays:
// The following rule accepts a number:
.use(remarkLintMaximumLineLength, 72)
.use(remarkLintMaximumLineLength, ['on', 72])
.use(remarkLintMaximumLineLength, [1, 72])
```
Expand Down

0 comments on commit d1e24ff

Please sign in to comment.