-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since typical usage of `unified-lint-rule` involves inferring the type based on a function call, the inferred type should be public. If private types are used, TypeScript will generate types for dependant packages that use relative paths. To solve this, public types in `unified-lint-rule` were moved from `lib/index.js` to `index.js`. `lintRule` only uses these public types. The severity can be set as a boolean. To support this, the `Label` type now accepts a boolean type. Two tests explicitly test bad input. These are annotated with a `@ts-expect-error` comment.
- Loading branch information
1 parent
a87a9d1
commit c1cdd52
Showing
3 changed files
with
46 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters