@ox-content/napi 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +51 -0
- package/index.js +2 -0
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -171,6 +171,53 @@ export interface JsLocaleInfo {
|
|
|
171
171
|
dir: string
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
export interface JsMarkdownLintDiagnostic {
|
|
175
|
+
ruleId: string
|
|
176
|
+
severity: string
|
|
177
|
+
message: string
|
|
178
|
+
line: number
|
|
179
|
+
column: number
|
|
180
|
+
endLine: number
|
|
181
|
+
endColumn: number
|
|
182
|
+
language?: string
|
|
183
|
+
suggestions?: Array<string>
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface JsMarkdownLintDictionaryOptions {
|
|
187
|
+
words?: Array<string>
|
|
188
|
+
byLanguage?: Array<JsMarkdownLintLanguageWords>
|
|
189
|
+
ignoredWords?: Array<string>
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface JsMarkdownLintLanguageWords {
|
|
193
|
+
language: string
|
|
194
|
+
words: Array<string>
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface JsMarkdownLintOptions {
|
|
198
|
+
languages?: Array<string>
|
|
199
|
+
rules?: JsMarkdownLintRuleOptions
|
|
200
|
+
dictionary?: JsMarkdownLintDictionaryOptions
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export interface JsMarkdownLintResult {
|
|
204
|
+
diagnostics: Array<JsMarkdownLintDiagnostic>
|
|
205
|
+
errorCount: number
|
|
206
|
+
warningCount: number
|
|
207
|
+
infoCount: number
|
|
208
|
+
maskedDocument: string
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface JsMarkdownLintRuleOptions {
|
|
212
|
+
duplicateHeadings?: boolean
|
|
213
|
+
headingIncrement?: boolean
|
|
214
|
+
maxConsecutiveBlankLines?: number
|
|
215
|
+
repeatedPunctuation?: boolean
|
|
216
|
+
repeatedWords?: boolean
|
|
217
|
+
spellcheck?: boolean
|
|
218
|
+
trailingSpaces?: boolean
|
|
219
|
+
}
|
|
220
|
+
|
|
174
221
|
/** OG image configuration for JavaScript. */
|
|
175
222
|
export interface JsOgImageConfig {
|
|
176
223
|
/** Image width in pixels. */
|
|
@@ -500,6 +547,10 @@ export interface JsTransformOptions {
|
|
|
500
547
|
codeAnnotationDefaultLineNumbers?: boolean
|
|
501
548
|
}
|
|
502
549
|
|
|
550
|
+
export declare function lintMarkdown(source: string, options?: JsMarkdownLintOptions | undefined | null): JsMarkdownLintResult
|
|
551
|
+
|
|
552
|
+
export declare function lintMarkdownDocuments(sources: Array<string>, options?: JsMarkdownLintOptions | undefined | null): Array<JsMarkdownLintResult>
|
|
553
|
+
|
|
503
554
|
/**
|
|
504
555
|
* Loads dictionaries from the given directory.
|
|
505
556
|
*
|
package/index.js
CHANGED
|
@@ -72,6 +72,8 @@ module.exports = binding;
|
|
|
72
72
|
module.exports.parse = binding.parse;
|
|
73
73
|
module.exports.parseAndRender = binding.parseAndRender;
|
|
74
74
|
module.exports.parseAndRenderAsync = binding.parseAndRenderAsync;
|
|
75
|
+
module.exports.lintMarkdown = binding.lintMarkdown;
|
|
76
|
+
module.exports.lintMarkdownDocuments = binding.lintMarkdownDocuments;
|
|
75
77
|
module.exports.render = binding.render;
|
|
76
78
|
module.exports.transform = binding.transform;
|
|
77
79
|
module.exports.transformAsync = binding.transformAsync;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ox-content/napi",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Node.js bindings for Ox Content - High-performance Markdown parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"@ox-content/binding-darwin-x64": "2.
|
|
49
|
-
"@ox-content/binding-darwin-arm64": "2.
|
|
50
|
-
"@ox-content/binding-linux-x64-gnu": "2.
|
|
51
|
-
"@ox-content/binding-linux-arm64-gnu": "2.
|
|
52
|
-
"@ox-content/binding-win32-x64-msvc": "2.
|
|
48
|
+
"@ox-content/binding-darwin-x64": "2.4.0",
|
|
49
|
+
"@ox-content/binding-darwin-arm64": "2.4.0",
|
|
50
|
+
"@ox-content/binding-linux-x64-gnu": "2.4.0",
|
|
51
|
+
"@ox-content/binding-linux-arm64-gnu": "2.4.0",
|
|
52
|
+
"@ox-content/binding-win32-x64-msvc": "2.4.0"
|
|
53
53
|
}
|
|
54
54
|
}
|