@utoo/lint 0.3.8 → 0.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/README.md +3 -0
- package/index.cjs +638 -278
- package/index.d.ts +11 -0
- package/index.js +638 -278
- package/lib/config-module.cjs +54 -0
- package/lib/estree-parser.cjs +662 -0
- package/lib/load-config.js +67 -1
- package/lib/plugin-runner.cjs +342 -0
- package/package.json +12 -7
package/index.d.ts
CHANGED
|
@@ -62,8 +62,15 @@ export interface Formatter {
|
|
|
62
62
|
export type RuleSeverity = "off" | "warn" | "warning" | "error" | 0 | 1 | 2 | false | true;
|
|
63
63
|
export type RuleConfig = RuleSeverity | [RuleSeverity, ...unknown[]];
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* An ESLint plugin object. Rules provided by a mounted plugin run in Node.js
|
|
67
|
+
* alongside the native rules; see the "ESLint Plugins" section of the
|
|
68
|
+
* configuration docs.
|
|
69
|
+
*/
|
|
65
70
|
export interface PluginObject {
|
|
71
|
+
meta?: { name?: string; version?: string; [key: string]: unknown };
|
|
66
72
|
rules?: Record<string, unknown>;
|
|
73
|
+
configs?: Record<string, unknown>;
|
|
67
74
|
[key: string]: unknown;
|
|
68
75
|
}
|
|
69
76
|
|
|
@@ -187,6 +194,10 @@ export class SourceCode {
|
|
|
187
194
|
lines: string[];
|
|
188
195
|
comments: SourceRange[];
|
|
189
196
|
tokens: SourceRange[];
|
|
197
|
+
parserServices: unknown;
|
|
198
|
+
/** Scope manager from `eslint-scope` (JavaScript) or `@typescript-eslint/scope-manager` (TypeScript). */
|
|
199
|
+
scopeManager: unknown;
|
|
200
|
+
visitorKeys: Record<string, readonly string[]> | null;
|
|
190
201
|
getText(node?: SourceRange, beforeCount?: number, afterCount?: number): string;
|
|
191
202
|
getLines(): string[];
|
|
192
203
|
getAllComments(): SourceRange[];
|