forked from NoiseFan/eslint-plugin-md-style
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinline-element.d.ts
More file actions
40 lines (36 loc) · 1 KB
/
inline-element.d.ts
File metadata and controls
40 lines (36 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import type { Emphasis, Image, InlineCode, Link, Strong } from 'mdast'
import type { ValueOf } from '@/types/index'
import type { INLINE_SPACE_MESSAGE_IDS } from '@/types/inline-element'
/**
* The Markdown inline element node types selected by space-around-inline-element.
*/
export type InlineElement = Link | Image | InlineCode | Emphasis | Strong
/**
* The allowed issue ids for inline element spacing rules.
*/
export type InlineElementSpaceIssue = ValueOf<typeof INLINE_SPACE_MESSAGE_IDS>
/**
* The relative position to check for spacing.
*/
export type PositionOptions = 'head' | 'tail'
/**
* The text context adjacent to a link.
*/
export interface AdjacentTextContext {
/**
* The neighboring text value, if any.
*/
value: string | undefined
/**
* The neighboring whitespace node.
*/
whiteSpace: whiteSpaceReturn
/**
* Whether the adjacent text contains punctuation.
*/
hasPunctuation: boolean
/**
* The punctuation classification.
*/
punctuationType: 'full' | 'half'
}