harper.js 0.33.0 → 0.34.1

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/dist/harper.d.ts CHANGED
@@ -79,6 +79,10 @@ export declare class Lint {
79
79
  * Get a description of the error.
80
80
  */
81
81
  message(): string;
82
+ /**
83
+ * Get a description of the error as HTML.
84
+ */
85
+ message_html(): string;
82
86
  }
83
87
 
84
88
  /** A linting rule configuration dependent on upstream Harper's available rules.
@@ -115,10 +119,14 @@ export declare interface Linter {
115
119
  getLintConfigAsJSON(): Promise<string>;
116
120
  /** Set the linter's current configuration from JSON. */
117
121
  setLintConfigWithJSON(config: string): Promise<void>;
118
- /** Get the linting rule descriptions as a JSON map. */
122
+ /** Get the linting rule descriptions as a JSON map, formatted in Markdown. */
119
123
  getLintDescriptionsAsJSON(): Promise<string>;
120
- /** Get the linting rule descriptions as an object */
124
+ /** Get the linting rule descriptions as an object, formatted in Markdown. */
121
125
  getLintDescriptions(): Promise<Record<string, string>>;
126
+ /** Get the linting rule descriptions as a JSON map, formatted in HTML. */
127
+ getLintDescriptionsHTMLAsJSON(): Promise<string>;
128
+ /** Get the linting rule descriptions as an object, formatted in HTML */
129
+ getLintDescriptionsHTML(): Promise<Record<string, string>>;
122
130
  /** Convert a string to Chicago-style title case. */
123
131
  toTitleCase(text: string): Promise<string>;
124
132
  /** Ignore future instances of a lint from a previous linting run in future invocations. */
@@ -168,16 +176,24 @@ declare class Linter_2 {
168
176
  */
169
177
  isolate_english(text: string): string;
170
178
  /**
171
- * Get a JSON map containing the descriptions of all the linting rules.
179
+ * Get a JSON map containing the descriptions of all the linting rules, formatted as HTML.
180
+ */
181
+ get_lint_descriptions_html_as_json(): string;
182
+ /**
183
+ * Get a Record containing the descriptions of all the linting rules, formatted as HTML.
184
+ */
185
+ get_lint_descriptions_html_as_object(): any;
186
+ /**
187
+ * Get a JSON map containing the descriptions of all the linting rules, formatted as Markdown.
172
188
  */
173
189
  get_lint_descriptions_as_json(): string;
174
- get_lint_config_as_json(): string;
175
- set_lint_config_from_json(json: string): void;
176
- summarize_stats(start_time?: bigint | null, end_time?: bigint | null): any;
177
190
  /**
178
- * Get a Record containing the descriptions of all the linting rules.
191
+ * Get a Record containing the descriptions of all the linting rules, formatted as Markdown.
179
192
  */
180
193
  get_lint_descriptions_as_object(): any;
194
+ get_lint_config_as_json(): string;
195
+ set_lint_config_from_json(json: string): void;
196
+ summarize_stats(start_time?: bigint | null, end_time?: bigint | null): any;
181
197
  get_lint_config_as_object(): any;
182
198
  set_lint_config_from_object(object: any): void;
183
199
  ignore_lint(source_text: string, lint: Lint): void;
@@ -249,6 +265,8 @@ export declare class LocalLinter implements Linter {
249
265
  toTitleCase(text: string): Promise<string>;
250
266
  getLintDescriptions(): Promise<Record<string, string>>;
251
267
  getLintDescriptionsAsJSON(): Promise<string>;
268
+ getLintDescriptionsHTML(): Promise<Record<string, string>>;
269
+ getLintDescriptionsHTMLAsJSON(): Promise<string>;
252
270
  ignoreLint(source: string, lint: Lint): Promise<void>;
253
271
  exportIgnoredLints(): Promise<string>;
254
272
  importIgnoredLints(json: string): Promise<void>;
@@ -372,6 +390,8 @@ export declare class WorkerLinter implements Linter {
372
390
  toTitleCase(text: string): Promise<string>;
373
391
  getLintDescriptionsAsJSON(): Promise<string>;
374
392
  getLintDescriptions(): Promise<Record<string, string>>;
393
+ getLintDescriptionsHTMLAsJSON(): Promise<string>;
394
+ getLintDescriptionsHTML(): Promise<Record<string, string>>;
375
395
  getDefaultLintConfigAsJSON(): Promise<string>;
376
396
  getDefaultLintConfig(): Promise<LintConfig>;
377
397
  ignoreLint(source: string, lint: Lint): Promise<void>;