@flint.fyi/plugin-flint 0.2.1 → 0.5.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/lib/index.d.ts +97 -1
- package/lib/index.js +836 -1
- package/lib/plugin.d.ts +93 -0
- package/lib/rules/getStartSourceFile.d.ts +10 -0
- package/lib/rules/invalidCodeLines.d.ts +5 -2
- package/lib/rules/missingPlaceholders.d.ts +10 -0
- package/lib/rules/nodePropertyInChecks.d.ts +10 -0
- package/lib/rules/placeholderFormats.d.ts +10 -0
- package/lib/rules/pluginRuleOrdering.d.ts +10 -0
- package/lib/rules/ruleCreationMethods.d.ts +10 -0
- package/lib/rules/ruleCreator.d.ts +3 -0
- package/lib/rules/testCaseDuplicates.d.ts +5 -2
- package/lib/rules/testCaseNameDuplicates.d.ts +10 -0
- package/lib/rules/testCaseNonStaticCode.d.ts +10 -0
- package/lib/rules/testCaseOnlyFlags.d.ts +10 -0
- package/lib/rules/testShorthands.d.ts +10 -0
- package/lib/rules/unusedMessageIds.d.ts +10 -0
- package/lib/utils/findProperty.d.ts +4 -0
- package/lib/utils/getRuleTesterCaseArrays.d.ts +6 -0
- package/lib/utils/getRuleTesterDescribedCases.d.ts +6 -0
- package/lib/utils/importHelpers.d.ts +5 -0
- package/lib/utils/isTypeFromTS.d.ts +3 -0
- package/lib/utils/messageHelpers.d.ts +12 -0
- package/lib/utils/parseTestCases.d.ts +5 -0
- package/lib/utils/ruleCreatorHelpers.d.ts +5 -0
- package/lib/utils/tsAstToLiteral.d.ts +6 -0
- package/lib/utils/types.d.ts +21 -0
- package/package.json +12 -7
- package/lib/findProperty.d.ts +0 -3
- package/lib/findProperty.js +0 -8
- package/lib/flint.d.ts +0 -10
- package/lib/flint.js +0 -8
- package/lib/getRuleTesterDescribedCases.d.ts +0 -6
- package/lib/getRuleTesterDescribedCases.js +0 -32
- package/lib/parseTestCases.d.ts +0 -5
- package/lib/parseTestCases.js +0 -63
- package/lib/rules/invalidCodeLines.js +0 -77
- package/lib/rules/invalidCodeLines.test.d.ts +0 -2
- package/lib/rules/invalidCodeLines.test.js +0 -198
- package/lib/rules/ruleTester.d.ts +0 -3
- package/lib/rules/ruleTester.js +0 -8
- package/lib/rules/testCaseDuplicates.js +0 -56
- package/lib/rules/testCaseDuplicates.test.d.ts +0 -2
- package/lib/rules/testCaseDuplicates.test.js +0 -174
- package/lib/tsAstToLiteral.d.ts +0 -5
- package/lib/tsAstToLiteral.js +0 -38
- package/lib/types.d.ts +0 -18
- package/lib/types.js +0 -2
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,98 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _flint_fyi_core0 from "@flint.fyi/core";
|
|
2
|
+
|
|
3
|
+
//#region src/plugin.d.ts
|
|
4
|
+
declare const flint: _flint_fyi_core0.Plugin<_flint_fyi_core0.RuleAbout, string | undefined, [_flint_fyi_core0.Rule<{
|
|
5
|
+
readonly description: "Requires passing `sourceFile` to `getStart()` for better performance.";
|
|
6
|
+
readonly id: "getStartSourceFile";
|
|
7
|
+
readonly presets: ["logical"];
|
|
8
|
+
} & {
|
|
9
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
10
|
+
url: string;
|
|
11
|
+
}, object, object, "missingSourceFile", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
12
|
+
readonly description: "Reports cases for invalid code that isn't formatted across lines.";
|
|
13
|
+
readonly id: "invalidCodeLines";
|
|
14
|
+
readonly presets: ["logical"];
|
|
15
|
+
} & {
|
|
16
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
17
|
+
url: string;
|
|
18
|
+
}, object, object, "singleLineTest", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
19
|
+
readonly description: "Reports `context.report()` calls missing data for message placeholders.";
|
|
20
|
+
readonly id: "missingPlaceholders";
|
|
21
|
+
readonly presets: ["logical"];
|
|
22
|
+
} & {
|
|
23
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
24
|
+
url: string;
|
|
25
|
+
}, object, object, "missingPlaceholders", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
26
|
+
readonly description: "Disallows using the `in` operator to check properties on TypeScript nodes.";
|
|
27
|
+
readonly id: "nodePropertyInChecks";
|
|
28
|
+
readonly presets: ["logical"];
|
|
29
|
+
} & {
|
|
30
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
31
|
+
url: string;
|
|
32
|
+
}, object, object, "nodePropertyInChecks", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
33
|
+
readonly description: "Reports and auto-fixes message placeholders that are not formatted as `{{ placeholder }}`.";
|
|
34
|
+
readonly id: "placeholderFormats";
|
|
35
|
+
readonly presets: ["stylistic", "stylisticStrict"];
|
|
36
|
+
} & {
|
|
37
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
38
|
+
url: string;
|
|
39
|
+
}, object, object, "placeholderFormats", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
40
|
+
readonly description: "Reports Flint plugin `rules` arrays that are not sorted alphabetically.";
|
|
41
|
+
readonly id: "pluginRuleOrdering";
|
|
42
|
+
readonly presets: ["stylisticStrict"];
|
|
43
|
+
} & {
|
|
44
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
45
|
+
url: string;
|
|
46
|
+
}, object, object, "pluginRuleOrdering", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
47
|
+
readonly description: "Reports plugin rules created directly with language instead of through RuleCreator.";
|
|
48
|
+
readonly id: "ruleCreationMethods";
|
|
49
|
+
readonly presets: ["logical"];
|
|
50
|
+
} & {
|
|
51
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
52
|
+
url: string;
|
|
53
|
+
}, object, object, "ruleCreationMethods", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
54
|
+
readonly description: "Reports test cases that are identical to previous test cases.";
|
|
55
|
+
readonly id: "testCaseDuplicates";
|
|
56
|
+
readonly presets: ["logical"];
|
|
57
|
+
} & {
|
|
58
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
59
|
+
url: string;
|
|
60
|
+
}, object, object, "duplicateTest", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
61
|
+
readonly description: "Reports test cases that have the same name as a previous test case.";
|
|
62
|
+
readonly id: "testCaseNameDuplicates";
|
|
63
|
+
readonly presets: ["logical"];
|
|
64
|
+
} & {
|
|
65
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
66
|
+
url: string;
|
|
67
|
+
}, object, object, "duplicateTestName", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
68
|
+
readonly description: "Test case code should be a static string literal.";
|
|
69
|
+
readonly id: "testCaseNonStaticCode";
|
|
70
|
+
readonly presets: ["logical"];
|
|
71
|
+
} & {
|
|
72
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
73
|
+
url: string;
|
|
74
|
+
}, object, object, "nonStaticTestCaseCode", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
75
|
+
readonly description: "Reports test cases that are marked `only: true`.";
|
|
76
|
+
readonly id: "testCaseOnlyFlags";
|
|
77
|
+
readonly presets: ["logical"];
|
|
78
|
+
} & {
|
|
79
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
80
|
+
url: string;
|
|
81
|
+
}, object, object, "testCaseOnly", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
82
|
+
readonly description: "Test cases with only a code property can use string shorthand syntax instead of object literal syntax.";
|
|
83
|
+
readonly id: "testShorthands";
|
|
84
|
+
readonly presets: ["logical"];
|
|
85
|
+
} & {
|
|
86
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
87
|
+
url: string;
|
|
88
|
+
}, object, object, "testShorthands", _flint_fyi_core0.AnyOptionalSchema>, _flint_fyi_core0.Rule<{
|
|
89
|
+
readonly description: "Reports message IDs defined in the messages object that are never used in recognized report calls.";
|
|
90
|
+
readonly id: "unusedMessageIds";
|
|
91
|
+
readonly presets: ["logical"];
|
|
92
|
+
} & {
|
|
93
|
+
presets?: ("logical" | "logicalStrict" | "stylistic" | "stylisticStrict")[];
|
|
94
|
+
url: string;
|
|
95
|
+
}, object, object, "unusedMessageIds", _flint_fyi_core0.AnyOptionalSchema>]>;
|
|
96
|
+
//#endregion
|
|
97
|
+
export { flint };
|
|
2
98
|
//# sourceMappingURL=index.d.ts.map
|