Skip to content

Commit db9755f

Browse files
committedMay 16, 2023
Refactor types
1 parent 0beb67b commit db9755f

File tree

41 files changed

+234
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+234
-89
lines changed
 

‎packages/remark-lint-blockquote-indentation/index.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,13 @@
7979
*/
8080

8181
/**
82-
* @typedef {import('mdast').Root} Root
8382
* @typedef {import('mdast').Blockquote} Blockquote
84-
* @typedef {'consistent'|number} Options
83+
* @typedef {import('mdast').Root} Root
84+
*/
85+
86+
/**
87+
* @typedef {'consistent' | number} Options
88+
* Options.
8589
*/
8690

8791
import {lintRule} from 'unified-lint-rule'

‎packages/remark-lint-checkbox-character-style/index.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,18 @@
8989

9090
/**
9191
* @typedef {import('mdast').Root} Root
92-
*
92+
*/
93+
94+
/**
9395
* @typedef Styles
94-
* @property {'x'|'X'|'consistent'} [checked='consistent']
95-
* @property {' '|'\x09'|'consistent'} [unchecked='consistent']
96-
*
97-
* @typedef {'consistent'|Styles} Options
96+
* Styles.
97+
* @property {'x' | 'X' | 'consistent'} [checked='consistent']
98+
* Preferred style to use for checked checkboxes (default: `'consistent'`).
99+
* @property {' ' | '\t' | 'consistent'} [unchecked='consistent']
100+
* Preferred style to use for unchecked checkboxes (default: `'consistent'`).
101+
*
102+
* @typedef {'consistent' | Styles} Options
103+
* Options.
98104
*/
99105

100106
import {lintRule} from 'unified-lint-rule'
@@ -109,9 +115,9 @@ const remarkLintCheckboxCharacterStyle = lintRule(
109115
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
110116
(tree, file, option = 'consistent') => {
111117
const value = String(file)
112-
/** @type {'x'|'X'|'consistent'} */
118+
/** @type {'x' | 'X' | 'consistent'} */
113119
let checked = 'consistent'
114-
/** @type {' '|'\x09'|'consistent'} */
120+
/** @type {' ' | '\x09' | 'consistent'} */
115121
let unchecked = 'consistent'
116122

117123
if (typeof option === 'object') {

0 commit comments

Comments
 (0)
Please sign in to comment.