harper.js 0.13.1 → 0.14.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/dist/harper.d.ts +8 -0
- package/dist/harper.js +82 -47
- package/package.json +2 -2
- package/src/Linter.test.ts +19 -0
- package/src/Linter.ts +6 -0
- package/src/LocalLinter.ts +10 -0
- package/src/WorkerLinter/index.ts +8 -0
- package/vite.config.js +1 -1
package/dist/harper.d.ts
CHANGED
|
@@ -30,6 +30,10 @@ export declare interface Linter {
|
|
|
30
30
|
getLintConfigAsJSON(): Promise<string>;
|
|
31
31
|
/** Set the linter's current configuration from JSON. */
|
|
32
32
|
setLintConfigWithJSON(config: string): Promise<void>;
|
|
33
|
+
/** Get the linting rule descriptions as a JSON map. */
|
|
34
|
+
getLintDescriptionsAsJSON(): Promise<string>;
|
|
35
|
+
/** Get the linting rule descriptions as an object */
|
|
36
|
+
getLintDescriptions(): Promise<Record<string, string>>;
|
|
33
37
|
/** Convert a string to Chicago-style title case. */
|
|
34
38
|
toTitleCase(text: string): Promise<string>;
|
|
35
39
|
}
|
|
@@ -49,6 +53,8 @@ export declare class LocalLinter implements Linter {
|
|
|
49
53
|
getLintConfigAsJSON(): Promise<string>;
|
|
50
54
|
setLintConfigWithJSON(config: string): Promise<void>;
|
|
51
55
|
toTitleCase(text: string): Promise<string>;
|
|
56
|
+
getLintDescriptions(): Promise<Record<string, string>>;
|
|
57
|
+
getLintDescriptionsAsJSON(): Promise<string>;
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
export { Span }
|
|
@@ -81,6 +87,8 @@ export declare class WorkerLinter implements Linter {
|
|
|
81
87
|
getLintConfigAsJSON(): Promise<string>;
|
|
82
88
|
setLintConfigWithJSON(config: string): Promise<void>;
|
|
83
89
|
toTitleCase(text: string): Promise<string>;
|
|
90
|
+
getLintDescriptionsAsJSON(): Promise<string>;
|
|
91
|
+
getLintDescriptions(): Promise<Record<string, string>>;
|
|
84
92
|
/** Run a procedure on the remote worker. */
|
|
85
93
|
private rpc;
|
|
86
94
|
private submitRemainingRequests;
|