react-doctor 0.0.47 → 0.1.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 +106 -238
- package/dist/cli.js +788 -108
- package/dist/eslint-plugin.d.ts +57 -0
- package/dist/eslint-plugin.js +6965 -0
- package/dist/index.d.ts +33 -2
- package/dist/index.js +907 -397
- package/dist/react-doctor-plugin.js +2010 -320
- package/package.json +9 -13
- package/dist/browser-BOxs7MrK.js +0 -359
- package/dist/browser-Dcq3yn-p.d.ts +0 -146
- package/dist/browser.d.ts +0 -2
- package/dist/browser.js +0 -2
- package/dist/worker.d.ts +0 -2
- package/dist/worker.js +0 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//#region src/oxlint-config.d.ts
|
|
2
|
+
type RuleSeverity = "error" | "warn" | "off";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/plugin/types.d.ts
|
|
5
|
+
interface RuleVisitors {
|
|
6
|
+
[selector: string]: ((node: EsTreeNode) => void) | (() => void);
|
|
7
|
+
}
|
|
8
|
+
interface EsTreeNode {
|
|
9
|
+
type: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/eslint-plugin.d.ts
|
|
14
|
+
interface EslintRuleContext {
|
|
15
|
+
report: (descriptor: {
|
|
16
|
+
node: EsTreeNode;
|
|
17
|
+
message: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
getFilename?: () => string;
|
|
20
|
+
}
|
|
21
|
+
interface EslintRuleMeta {
|
|
22
|
+
type: "problem" | "suggestion" | "layout";
|
|
23
|
+
docs: {
|
|
24
|
+
description: string;
|
|
25
|
+
url: string;
|
|
26
|
+
recommended: boolean;
|
|
27
|
+
};
|
|
28
|
+
schema: unknown[];
|
|
29
|
+
}
|
|
30
|
+
interface EslintRule {
|
|
31
|
+
meta: EslintRuleMeta;
|
|
32
|
+
create: (context: EslintRuleContext) => RuleVisitors;
|
|
33
|
+
}
|
|
34
|
+
interface EslintFlatConfig {
|
|
35
|
+
name: string;
|
|
36
|
+
plugins: Record<string, EslintPlugin>;
|
|
37
|
+
rules: Record<string, RuleSeverity>;
|
|
38
|
+
}
|
|
39
|
+
interface EslintPlugin {
|
|
40
|
+
meta: {
|
|
41
|
+
name: string;
|
|
42
|
+
version: string;
|
|
43
|
+
};
|
|
44
|
+
rules: Record<string, EslintRule>;
|
|
45
|
+
configs: {
|
|
46
|
+
recommended: EslintFlatConfig;
|
|
47
|
+
next: EslintFlatConfig;
|
|
48
|
+
"react-native": EslintFlatConfig;
|
|
49
|
+
"tanstack-start": EslintFlatConfig;
|
|
50
|
+
"tanstack-query": EslintFlatConfig;
|
|
51
|
+
all: EslintFlatConfig;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
declare const eslintPlugin: EslintPlugin;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { eslintPlugin as default };
|
|
57
|
+
//# sourceMappingURL=eslint-plugin.d.ts.map
|