@flint.fyi/plugin-flint 0.5.2 → 0.7.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.
@@ -1,91 +1,89 @@
1
- import * as _flint_fyi_core0 from "@flint.fyi/core";
2
-
3
1
  //#region src/plugin.d.ts
4
- declare const flint: _flint_fyi_core0.Plugin<_flint_fyi_core0.RuleAbout<string>, string | undefined, [_flint_fyi_core0.Rule<{
2
+ declare const flint: import("@flint.fyi/core").Plugin<import("@flint.fyi/core").RuleAbout<string>, string | undefined, [import("@flint.fyi/core").Rule<{
5
3
  readonly description: "Requires passing `sourceFile` to `getStart()` for better performance.";
6
4
  readonly id: "getStartSourceFile";
7
5
  readonly presets: readonly ["logical"];
8
6
  } & {
9
7
  readonly pluginId: string;
10
8
  readonly url: string;
11
- }, "missingSourceFile", undefined>, _flint_fyi_core0.Rule<{
9
+ }, "missingSourceFile", undefined>, import("@flint.fyi/core").Rule<{
12
10
  readonly description: "Reports cases for invalid code that isn't formatted across lines.";
13
11
  readonly id: "invalidCodeLines";
14
12
  readonly presets: readonly ["logical"];
15
13
  } & {
16
14
  readonly pluginId: string;
17
15
  readonly url: string;
18
- }, "singleLineTest", undefined>, _flint_fyi_core0.Rule<{
16
+ }, "singleLineTest", undefined>, import("@flint.fyi/core").Rule<{
19
17
  readonly description: "Reports `context.report()` calls missing data for message placeholders.";
20
18
  readonly id: "missingPlaceholders";
21
19
  readonly presets: readonly ["logical"];
22
20
  } & {
23
21
  readonly pluginId: string;
24
22
  readonly url: string;
25
- }, "missingPlaceholders", undefined>, _flint_fyi_core0.Rule<{
23
+ }, "missingPlaceholders", undefined>, import("@flint.fyi/core").Rule<{
26
24
  readonly description: "Disallows using the `in` operator to check properties on TypeScript nodes.";
27
25
  readonly id: "nodePropertyInChecks";
28
26
  readonly presets: readonly ["logical"];
29
27
  } & {
30
28
  readonly pluginId: string;
31
29
  readonly url: string;
32
- }, "nodePropertyInChecks", undefined>, _flint_fyi_core0.Rule<{
30
+ }, "nodePropertyInChecks", undefined>, import("@flint.fyi/core").Rule<{
33
31
  readonly description: "Reports and auto-fixes message placeholders that are not formatted as `{{ placeholder }}`.";
34
32
  readonly id: "placeholderFormats";
35
33
  readonly presets: readonly ["stylistic", "stylisticStrict"];
36
34
  } & {
37
35
  readonly pluginId: string;
38
36
  readonly url: string;
39
- }, "placeholderFormats", undefined>, _flint_fyi_core0.Rule<{
37
+ }, "placeholderFormats", undefined>, import("@flint.fyi/core").Rule<{
40
38
  readonly description: "Reports Flint plugin `rules` arrays that are not sorted alphabetically.";
41
39
  readonly id: "pluginRuleOrdering";
42
40
  readonly presets: readonly ["stylisticStrict"];
43
41
  } & {
44
42
  readonly pluginId: string;
45
43
  readonly url: string;
46
- }, "pluginRuleOrdering", undefined>, _flint_fyi_core0.Rule<{
44
+ }, "pluginRuleOrdering", undefined>, import("@flint.fyi/core").Rule<{
47
45
  readonly description: "Reports plugin rules created directly with language instead of through RuleCreator.";
48
46
  readonly id: "ruleCreationMethods";
49
47
  readonly presets: readonly ["logical"];
50
48
  } & {
51
49
  readonly pluginId: string;
52
50
  readonly url: string;
53
- }, "ruleCreationMethods", undefined>, _flint_fyi_core0.Rule<{
51
+ }, "ruleCreationMethods", undefined>, import("@flint.fyi/core").Rule<{
54
52
  readonly description: "Reports test cases that are identical to previous test cases.";
55
53
  readonly id: "testCaseDuplicates";
56
54
  readonly presets: readonly ["logical"];
57
55
  } & {
58
56
  readonly pluginId: string;
59
57
  readonly url: string;
60
- }, "duplicateTest", undefined>, _flint_fyi_core0.Rule<{
58
+ }, "duplicateTest", undefined>, import("@flint.fyi/core").Rule<{
61
59
  readonly description: "Reports test cases that have the same name as a previous test case.";
62
60
  readonly id: "testCaseNameDuplicates";
63
61
  readonly presets: readonly ["logical"];
64
62
  } & {
65
63
  readonly pluginId: string;
66
64
  readonly url: string;
67
- }, "duplicateTestName", undefined>, _flint_fyi_core0.Rule<{
65
+ }, "duplicateTestName", undefined>, import("@flint.fyi/core").Rule<{
68
66
  readonly description: "Test case code should be a static string literal.";
69
67
  readonly id: "testCaseNonStaticCode";
70
68
  readonly presets: readonly ["logical"];
71
69
  } & {
72
70
  readonly pluginId: string;
73
71
  readonly url: string;
74
- }, "nonStaticTestCaseCode", undefined>, _flint_fyi_core0.Rule<{
72
+ }, "nonStaticTestCaseCode", undefined>, import("@flint.fyi/core").Rule<{
75
73
  readonly description: "Reports test cases that are marked `only: true`.";
76
74
  readonly id: "testCaseOnlyFlags";
77
75
  readonly presets: readonly ["logical"];
78
76
  } & {
79
77
  readonly pluginId: string;
80
78
  readonly url: string;
81
- }, "testCaseOnly", undefined>, _flint_fyi_core0.Rule<{
79
+ }, "testCaseOnly", undefined>, import("@flint.fyi/core").Rule<{
82
80
  readonly description: "Test cases with only a code property can use string shorthand syntax instead of object literal syntax.";
83
81
  readonly id: "testShorthands";
84
82
  readonly presets: readonly ["logical"];
85
83
  } & {
86
84
  readonly pluginId: string;
87
85
  readonly url: string;
88
- }, "testShorthands", undefined>, _flint_fyi_core0.Rule<{
86
+ }, "testShorthands", undefined>, import("@flint.fyi/core").Rule<{
89
87
  readonly description: "Reports message IDs defined in the messages object that are never used in recognized report calls.";
90
88
  readonly id: "unusedMessageIds";
91
89
  readonly presets: readonly ["logical"];
@@ -94,5 +92,4 @@ declare const flint: _flint_fyi_core0.Plugin<_flint_fyi_core0.RuleAbout<string>,
94
92
  readonly url: string;
95
93
  }, "unusedMessageIds", undefined>]>;
96
94
  //#endregion
97
- export { flint };
98
- //# sourceMappingURL=index.d.ts.map
95
+ export { flint };
@@ -193,11 +193,11 @@ var invalidCodeLines_default = ruleCreator.createRule(typescriptLanguage, {
193
193
  });
194
194
  }
195
195
  function createNewlineFixes(code, node, sourceFile) {
196
- if (node.kind === ts.SyntaxKind.StringLiteral) return [{
196
+ if (node.kind === SyntaxKind.StringLiteral) return [{
197
197
  range: getTSNodeRange(node, sourceFile),
198
198
  text: `\`\n${code}\n\``
199
199
  }];
200
- const template = node.kind === ts.SyntaxKind.TaggedTemplateExpression ? node.template : node;
200
+ const template = node.kind === SyntaxKind.TaggedTemplateExpression ? node.template : node;
201
201
  const changes = [];
202
202
  if (!code.startsWith("\n")) changes.push({
203
203
  range: {
@@ -714,9 +714,9 @@ var testShorthands_default = ruleCreator.createRule(typescriptLanguage, {
714
714
  if (!describedCases) return;
715
715
  for (const testCase of describedCases.valid) {
716
716
  const caseNode = testCase.nodes.case;
717
- if (ts.isObjectLiteralExpression(caseNode) && caseNode.properties.length === 1 && caseNode.properties[0]?.name && ts.isIdentifier(caseNode.properties[0].name) && caseNode.properties[0].name.text === "code") {
717
+ if (caseNode.kind === SyntaxKind.ObjectLiteralExpression && caseNode.properties.length === 1 && caseNode.properties[0]?.name?.kind === SyntaxKind.Identifier && caseNode.properties[0].name.text === "code") {
718
718
  let fix;
719
- if (ts.isPropertyAssignment(caseNode.properties[0])) fix = {
719
+ if (caseNode.properties[0].kind === SyntaxKind.PropertyAssignment) fix = {
720
720
  range: getTSNodeRange(caseNode, sourceFile),
721
721
  text: caseNode.properties[0].initializer.getText(sourceFile)
722
722
  };
@@ -841,5 +841,3 @@ const flint = createPlugin({
841
841
  });
842
842
  //#endregion
843
843
  export { flint };
844
-
845
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flint.fyi/plugin-flint",
3
- "version": "0.5.2",
3
+ "version": "0.7.0",
4
4
  "description": "[Experimental] A Flint plugin for linting Flint plugins.",
5
5
  "homepage": "https://flint.fyi/rules/flint",
6
6
  "repository": {
@@ -16,22 +16,22 @@
16
16
  "sideEffects": false,
17
17
  "type": "module",
18
18
  "exports": {
19
- ".": "./lib/index.js"
19
+ ".": "./dist/index.mjs"
20
20
  },
21
21
  "files": [
22
- "lib/",
23
- "!lib/**/*.map"
22
+ "dist/"
24
23
  ],
25
24
  "dependencies": {
26
- "typescript": "^5.9.3 || ^6.0.0",
27
- "@flint.fyi/typescript-language": "^0.18.3",
28
- "@flint.fyi/utils": "^0.14.1",
29
- "@flint.fyi/core": "^0.23.0"
25
+ "typescript": "^6.0.0",
26
+ "@flint.fyi/core": "^0.24.0",
27
+ "@flint.fyi/typescript-language": "^0.19.0",
28
+ "@flint.fyi/utils": "^0.15.0"
30
29
  },
31
30
  "devDependencies": {
32
- "tsdown": "0.21.0",
31
+ "tsdown": "0.22.3",
33
32
  "vitest": "4.1.0",
34
- "@flint.fyi/rule-tester": "^0.16.4"
33
+ "@flint.fyi/build": "^0.1.0",
34
+ "@flint.fyi/rule-tester": "^0.17.0"
35
35
  },
36
36
  "engines": {
37
37
  "node": ">=24.0.0"
package/lib/plugin.d.ts DELETED
@@ -1,93 +0,0 @@
1
- export declare const flint: import("@flint.fyi/core").Plugin<import("@flint.fyi/core").RuleAbout<string>, string | undefined, [import("@flint.fyi/core").Rule<{
2
- readonly description: "Requires passing `sourceFile` to `getStart()` for better performance.";
3
- readonly id: "getStartSourceFile";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "missingSourceFile", undefined>, import("@flint.fyi/core").Rule<{
9
- readonly description: "Reports cases for invalid code that isn't formatted across lines.";
10
- readonly id: "invalidCodeLines";
11
- readonly presets: readonly ["logical"];
12
- } & {
13
- readonly pluginId: string;
14
- readonly url: string;
15
- }, "singleLineTest", undefined>, import("@flint.fyi/core").Rule<{
16
- readonly description: "Reports `context.report()` calls missing data for message placeholders.";
17
- readonly id: "missingPlaceholders";
18
- readonly presets: readonly ["logical"];
19
- } & {
20
- readonly pluginId: string;
21
- readonly url: string;
22
- }, "missingPlaceholders", undefined>, import("@flint.fyi/core").Rule<{
23
- readonly description: "Disallows using the `in` operator to check properties on TypeScript nodes.";
24
- readonly id: "nodePropertyInChecks";
25
- readonly presets: readonly ["logical"];
26
- } & {
27
- readonly pluginId: string;
28
- readonly url: string;
29
- }, "nodePropertyInChecks", undefined>, import("@flint.fyi/core").Rule<{
30
- readonly description: "Reports and auto-fixes message placeholders that are not formatted as `{{ placeholder }}`.";
31
- readonly id: "placeholderFormats";
32
- readonly presets: readonly ["stylistic", "stylisticStrict"];
33
- } & {
34
- readonly pluginId: string;
35
- readonly url: string;
36
- }, "placeholderFormats", undefined>, import("@flint.fyi/core").Rule<{
37
- readonly description: "Reports Flint plugin `rules` arrays that are not sorted alphabetically.";
38
- readonly id: "pluginRuleOrdering";
39
- readonly presets: readonly ["stylisticStrict"];
40
- } & {
41
- readonly pluginId: string;
42
- readonly url: string;
43
- }, "pluginRuleOrdering", undefined>, import("@flint.fyi/core").Rule<{
44
- readonly description: "Reports plugin rules created directly with language instead of through RuleCreator.";
45
- readonly id: "ruleCreationMethods";
46
- readonly presets: readonly ["logical"];
47
- } & {
48
- readonly pluginId: string;
49
- readonly url: string;
50
- }, "ruleCreationMethods", undefined>, import("@flint.fyi/core").Rule<{
51
- readonly description: "Reports test cases that are identical to previous test cases.";
52
- readonly id: "testCaseDuplicates";
53
- readonly presets: readonly ["logical"];
54
- } & {
55
- readonly pluginId: string;
56
- readonly url: string;
57
- }, "duplicateTest", undefined>, import("@flint.fyi/core").Rule<{
58
- readonly description: "Reports test cases that have the same name as a previous test case.";
59
- readonly id: "testCaseNameDuplicates";
60
- readonly presets: readonly ["logical"];
61
- } & {
62
- readonly pluginId: string;
63
- readonly url: string;
64
- }, "duplicateTestName", undefined>, import("@flint.fyi/core").Rule<{
65
- readonly description: "Test case code should be a static string literal.";
66
- readonly id: "testCaseNonStaticCode";
67
- readonly presets: readonly ["logical"];
68
- } & {
69
- readonly pluginId: string;
70
- readonly url: string;
71
- }, "nonStaticTestCaseCode", undefined>, import("@flint.fyi/core").Rule<{
72
- readonly description: "Reports test cases that are marked `only: true`.";
73
- readonly id: "testCaseOnlyFlags";
74
- readonly presets: readonly ["logical"];
75
- } & {
76
- readonly pluginId: string;
77
- readonly url: string;
78
- }, "testCaseOnly", undefined>, import("@flint.fyi/core").Rule<{
79
- readonly description: "Test cases with only a code property can use string shorthand syntax instead of object literal syntax.";
80
- readonly id: "testShorthands";
81
- readonly presets: readonly ["logical"];
82
- } & {
83
- readonly pluginId: string;
84
- readonly url: string;
85
- }, "testShorthands", undefined>, import("@flint.fyi/core").Rule<{
86
- readonly description: "Reports message IDs defined in the messages object that are never used in recognized report calls.";
87
- readonly id: "unusedMessageIds";
88
- readonly presets: readonly ["logical"];
89
- } & {
90
- readonly pluginId: string;
91
- readonly url: string;
92
- }, "unusedMessageIds", undefined>]>;
93
- //# sourceMappingURL=plugin.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Requires passing `sourceFile` to `getStart()` for better performance.";
3
- readonly id: "getStartSourceFile";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "missingSourceFile", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=getStartSourceFile.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports cases for invalid code that isn't formatted across lines.";
3
- readonly id: "invalidCodeLines";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "singleLineTest", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=invalidCodeLines.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports `context.report()` calls missing data for message placeholders.";
3
- readonly id: "missingPlaceholders";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "missingPlaceholders", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=missingPlaceholders.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Disallows using the `in` operator to check properties on TypeScript nodes.";
3
- readonly id: "nodePropertyInChecks";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "nodePropertyInChecks", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=nodePropertyInChecks.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports and auto-fixes message placeholders that are not formatted as `{{ placeholder }}`.";
3
- readonly id: "placeholderFormats";
4
- readonly presets: readonly ["stylistic", "stylisticStrict"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "placeholderFormats", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=placeholderFormats.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports Flint plugin `rules` arrays that are not sorted alphabetically.";
3
- readonly id: "pluginRuleOrdering";
4
- readonly presets: readonly ["stylisticStrict"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "pluginRuleOrdering", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=pluginRuleOrdering.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports plugin rules created directly with language instead of through RuleCreator.";
3
- readonly id: "ruleCreationMethods";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "ruleCreationMethods", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=ruleCreationMethods.d.ts.map
@@ -1,3 +0,0 @@
1
- import { RuleCreator } from "@flint.fyi/core";
2
- export declare const ruleCreator: RuleCreator<"logical" | "logicalStrict" | "stylistic" | "stylisticStrict", import("@flint.fyi/core").RuleAbout<"logical" | "logicalStrict" | "stylistic" | "stylisticStrict">>;
3
- //# sourceMappingURL=ruleCreator.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports test cases that are identical to previous test cases.";
3
- readonly id: "testCaseDuplicates";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "duplicateTest", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=testCaseDuplicates.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports test cases that have the same name as a previous test case.";
3
- readonly id: "testCaseNameDuplicates";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "duplicateTestName", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=testCaseNameDuplicates.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Test case code should be a static string literal.";
3
- readonly id: "testCaseNonStaticCode";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "nonStaticTestCaseCode", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=testCaseNonStaticCode.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports test cases that are marked `only: true`.";
3
- readonly id: "testCaseOnlyFlags";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "testCaseOnly", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=testCaseOnlyFlags.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Test cases with only a code property can use string shorthand syntax instead of object literal syntax.";
3
- readonly id: "testShorthands";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "testShorthands", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=testShorthands.d.ts.map
@@ -1,10 +0,0 @@
1
- declare const _default: import("@flint.fyi/core").Rule<{
2
- readonly description: "Reports message IDs defined in the messages object that are never used in recognized report calls.";
3
- readonly id: "unusedMessageIds";
4
- readonly presets: readonly ["logical"];
5
- } & {
6
- readonly pluginId: string;
7
- readonly url: string;
8
- }, "unusedMessageIds", undefined>;
9
- export default _default;
10
- //# sourceMappingURL=unusedMessageIds.d.ts.map
@@ -1,4 +0,0 @@
1
- import type ts from "typescript";
2
- import type { AST } from "@flint.fyi/typescript-language";
3
- export declare function findProperty<Node extends AST.Expression>(properties: ts.NodeArray<AST.ObjectLiteralElementLike>, name: string, predicate: (node: AST.Expression) => node is Node): (AST.Expression & Node) | undefined;
4
- //# sourceMappingURL=findProperty.d.ts.map
@@ -1,6 +0,0 @@
1
- import type { AST } from "@flint.fyi/typescript-language";
2
- export declare function getRuleTesterCaseArrays(node: AST.CallExpression): {
3
- invalid: AST.ArrayLiteralExpression;
4
- valid: AST.ArrayLiteralExpression;
5
- } | undefined;
6
- //# sourceMappingURL=getRuleTesterCaseArrays.d.ts.map
@@ -1,40 +0,0 @@
1
- import type { AST } from "@flint.fyi/typescript-language";
2
- export declare function getRuleTesterDescribedCases(node: AST.CallExpression): {
3
- invalid: import("./types.ts").ParsedTestCaseInvalid[];
4
- valid: ({
5
- code: string;
6
- nodes: {
7
- case: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | (AST.TaggedTemplateExpression & {
8
- template: AST.NoSubstitutionTemplateLiteral;
9
- });
10
- code: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | (AST.TaggedTemplateExpression & {
11
- template: AST.NoSubstitutionTemplateLiteral;
12
- });
13
- fileName?: never;
14
- files?: never;
15
- name?: never;
16
- options?: never;
17
- };
18
- fileName?: never;
19
- files?: never;
20
- name?: never;
21
- options?: never;
22
- } | {
23
- code: string;
24
- fileName: string | undefined;
25
- files: Record<string, string> | undefined;
26
- name: string | undefined;
27
- nodes: {
28
- case: AST.ObjectLiteralExpression;
29
- code: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | (AST.TaggedTemplateExpression & {
30
- template: AST.NoSubstitutionTemplateLiteral;
31
- });
32
- fileName: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | undefined;
33
- files: AST.ObjectLiteralExpression | undefined;
34
- name: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | undefined;
35
- options: AST.ObjectLiteralExpression | undefined;
36
- };
37
- options: object | undefined;
38
- })[];
39
- } | undefined;
40
- //# sourceMappingURL=getRuleTesterDescribedCases.d.ts.map
@@ -1,5 +0,0 @@
1
- import { type Node } from "typescript";
2
- import type { AST } from "@flint.fyi/typescript-language";
3
- export declare function isImportedBindingFromModule(declaration: Node, moduleName: string): declaration is AST.ImportSpecifier | AST.NamespaceImport;
4
- export declare function isImportedSpecifierFromModule(declaration: Node, moduleName: string, importedName: string): declaration is AST.ImportSpecifier;
5
- //# sourceMappingURL=importHelpers.d.ts.map
@@ -1,3 +0,0 @@
1
- import type { AST, Checker } from "@flint.fyi/typescript-language";
2
- export declare function isTypeFromTS(node: AST.Expression, typeChecker: Checker, typeName: string): boolean;
3
- //# sourceMappingURL=isTypeFromTS.d.ts.map
@@ -1,12 +0,0 @@
1
- import type { AST } from "@flint.fyi/typescript-language";
2
- interface MessageStringVisitorContext {
3
- isInArray: boolean;
4
- messageId: string;
5
- node: AST.StringLiteral;
6
- propertyName: string;
7
- }
8
- export declare function findMessagesProperty(node: AST.CallExpression): AST.PropertyAssignment | undefined;
9
- export declare function forEachMessageString(messagesProperty: AST.PropertyAssignment): Generator<MessageStringVisitorContext>;
10
- export declare function getStringOriginalQuote(node: AST.StringLiteral, sourceFile: AST.SourceFile): string;
11
- export {};
12
- //# sourceMappingURL=messageHelpers.d.ts.map
@@ -1,39 +0,0 @@
1
- import { type AST } from "@flint.fyi/typescript-language";
2
- import type { ParsedTestCaseInvalid } from "./types.ts";
3
- export declare function parseTestCase(node: AST.Expression): {
4
- code: string;
5
- nodes: {
6
- case: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | (AST.TaggedTemplateExpression & {
7
- template: AST.NoSubstitutionTemplateLiteral;
8
- });
9
- code: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | (AST.TaggedTemplateExpression & {
10
- template: AST.NoSubstitutionTemplateLiteral;
11
- });
12
- fileName?: never;
13
- files?: never;
14
- name?: never;
15
- options?: never;
16
- };
17
- fileName?: never;
18
- files?: never;
19
- name?: never;
20
- options?: never;
21
- } | {
22
- code: string;
23
- fileName: string | undefined;
24
- files: Record<string, string> | undefined;
25
- name: string | undefined;
26
- nodes: {
27
- case: AST.ObjectLiteralExpression;
28
- code: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | (AST.TaggedTemplateExpression & {
29
- template: AST.NoSubstitutionTemplateLiteral;
30
- });
31
- fileName: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | undefined;
32
- files: AST.ObjectLiteralExpression | undefined;
33
- name: AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | undefined;
34
- options: AST.ObjectLiteralExpression | undefined;
35
- };
36
- options: object | undefined;
37
- } | undefined;
38
- export declare function parseTestCaseInvalid(node: AST.Expression): ParsedTestCaseInvalid | undefined;
39
- //# sourceMappingURL=parseTestCases.d.ts.map
@@ -1,5 +0,0 @@
1
- import type { AST, Checker } from "@flint.fyi/typescript-language";
2
- export declare function isLanguageCreateRule(node: AST.CallExpression, typeChecker: Checker): boolean;
3
- export declare const isRuleCreatorCreateRule: (node: AST.CallExpression, typeChecker: Checker) => boolean;
4
- export declare const isRuleContextReport: (node: AST.CallExpression, typeChecker: Checker) => boolean;
5
- //# sourceMappingURL=ruleCreatorHelpers.d.ts.map
@@ -1,6 +0,0 @@
1
- import ts from "typescript";
2
- import type { AST } from "@flint.fyi/typescript-language";
3
- export declare function tsAstToLiteral(node: AST.ArrayLiteralExpression): unknown[];
4
- export declare function tsAstToLiteral(node: AST.ObjectLiteralExpression): object;
5
- export declare function tsAstToLiteral(node: ts.Node): unknown;
6
- //# sourceMappingURL=tsAstToLiteral.d.ts.map
@@ -1,25 +0,0 @@
1
- import type * as ts from "typescript";
2
- import type { InvalidTestCase, TestCase } from "@flint.fyi/rule-tester";
3
- import type { AST } from "@flint.fyi/typescript-language";
4
- export interface ParsedTestCase extends TestCase {
5
- nodes: ParsedTestCaseNodes;
6
- }
7
- export type ParsedTestCaseCodeNode = AST.NoSubstitutionTemplateLiteral | AST.StringLiteral | (AST.TaggedTemplateExpression & {
8
- template: AST.NoSubstitutionTemplateLiteral;
9
- });
10
- export interface ParsedTestCaseInvalid extends InvalidTestCase {
11
- nodes: ParsedTestCaseNodesInvalid;
12
- }
13
- export interface ParsedTestCaseNodes {
14
- case: ts.Node;
15
- code: ParsedTestCaseCodeNode;
16
- fileName?: ParsedTestCaseStaticStringNode | undefined;
17
- files?: AST.ObjectLiteralExpression | undefined;
18
- name?: ParsedTestCaseStaticStringNode | undefined;
19
- options?: AST.ObjectLiteralExpression | undefined;
20
- }
21
- export interface ParsedTestCaseNodesInvalid extends ParsedTestCaseNodes {
22
- snapshot: ParsedTestCaseStaticStringNode;
23
- }
24
- export type ParsedTestCaseStaticStringNode = AST.NoSubstitutionTemplateLiteral | AST.StringLiteral;
25
- //# sourceMappingURL=types.d.ts.map