@flint.fyi/plugin-flint 0.5.2 → 0.6.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 CHANGED
@@ -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 };
package/lib/index.js CHANGED
@@ -841,5 +841,3 @@ const flint = createPlugin({
841
841
  });
842
842
  //#endregion
843
843
  export { flint };
844
-
845
- //# sourceMappingURL=index.js.map
package/lib/plugin.d.ts CHANGED
@@ -90,4 +90,3 @@ export declare const flint: import("@flint.fyi/core").Plugin<import("@flint.fyi/
90
90
  readonly pluginId: string;
91
91
  readonly url: string;
92
92
  }, "unusedMessageIds", undefined>]>;
93
- //# sourceMappingURL=plugin.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingSourceFile", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=getStartSourceFile.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "singleLineTest", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=invalidCodeLines.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingPlaceholders", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=missingPlaceholders.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "nodePropertyInChecks", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=nodePropertyInChecks.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "placeholderFormats", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=placeholderFormats.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "pluginRuleOrdering", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=pluginRuleOrdering.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "ruleCreationMethods", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=ruleCreationMethods.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { RuleCreator } from "@flint.fyi/core";
2
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
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "duplicateTest", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=testCaseDuplicates.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "duplicateTestName", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=testCaseNameDuplicates.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "nonStaticTestCaseCode", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=testCaseNonStaticCode.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "testCaseOnly", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=testCaseOnlyFlags.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "testShorthands", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=testShorthands.d.ts.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "unusedMessageIds", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=unusedMessageIds.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type ts from "typescript";
2
2
  import type { AST } from "@flint.fyi/typescript-language";
3
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
@@ -3,4 +3,3 @@ export declare function getRuleTesterCaseArrays(node: AST.CallExpression): {
3
3
  invalid: AST.ArrayLiteralExpression;
4
4
  valid: AST.ArrayLiteralExpression;
5
5
  } | undefined;
6
- //# sourceMappingURL=getRuleTesterCaseArrays.d.ts.map
@@ -37,4 +37,3 @@ export declare function getRuleTesterDescribedCases(node: AST.CallExpression): {
37
37
  options: object | undefined;
38
38
  })[];
39
39
  } | undefined;
40
- //# sourceMappingURL=getRuleTesterDescribedCases.d.ts.map
@@ -2,4 +2,3 @@ import { type Node } from "typescript";
2
2
  import type { AST } from "@flint.fyi/typescript-language";
3
3
  export declare function isImportedBindingFromModule(declaration: Node, moduleName: string): declaration is AST.ImportSpecifier | AST.NamespaceImport;
4
4
  export declare function isImportedSpecifierFromModule(declaration: Node, moduleName: string, importedName: string): declaration is AST.ImportSpecifier;
5
- //# sourceMappingURL=importHelpers.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { AST, Checker } from "@flint.fyi/typescript-language";
2
2
  export declare function isTypeFromTS(node: AST.Expression, typeChecker: Checker, typeName: string): boolean;
3
- //# sourceMappingURL=isTypeFromTS.d.ts.map
@@ -9,4 +9,3 @@ export declare function findMessagesProperty(node: AST.CallExpression): AST.Prop
9
9
  export declare function forEachMessageString(messagesProperty: AST.PropertyAssignment): Generator<MessageStringVisitorContext>;
10
10
  export declare function getStringOriginalQuote(node: AST.StringLiteral, sourceFile: AST.SourceFile): string;
11
11
  export {};
12
- //# sourceMappingURL=messageHelpers.d.ts.map
@@ -36,4 +36,3 @@ export declare function parseTestCase(node: AST.Expression): {
36
36
  options: object | undefined;
37
37
  } | undefined;
38
38
  export declare function parseTestCaseInvalid(node: AST.Expression): ParsedTestCaseInvalid | undefined;
39
- //# sourceMappingURL=parseTestCases.d.ts.map
@@ -2,4 +2,3 @@ import type { AST, Checker } from "@flint.fyi/typescript-language";
2
2
  export declare function isLanguageCreateRule(node: AST.CallExpression, typeChecker: Checker): boolean;
3
3
  export declare const isRuleCreatorCreateRule: (node: AST.CallExpression, typeChecker: Checker) => boolean;
4
4
  export declare const isRuleContextReport: (node: AST.CallExpression, typeChecker: Checker) => boolean;
5
- //# sourceMappingURL=ruleCreatorHelpers.d.ts.map
@@ -3,4 +3,3 @@ import type { AST } from "@flint.fyi/typescript-language";
3
3
  export declare function tsAstToLiteral(node: AST.ArrayLiteralExpression): unknown[];
4
4
  export declare function tsAstToLiteral(node: AST.ObjectLiteralExpression): object;
5
5
  export declare function tsAstToLiteral(node: ts.Node): unknown;
6
- //# sourceMappingURL=tsAstToLiteral.d.ts.map
@@ -22,4 +22,3 @@ export interface ParsedTestCaseNodesInvalid extends ParsedTestCaseNodes {
22
22
  snapshot: ParsedTestCaseStaticStringNode;
23
23
  }
24
24
  export type ParsedTestCaseStaticStringNode = AST.NoSubstitutionTemplateLiteral | AST.StringLiteral;
25
- //# sourceMappingURL=types.d.ts.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.6.0",
4
4
  "description": "[Experimental] A Flint plugin for linting Flint plugins.",
5
5
  "homepage": "https://flint.fyi/rules/flint",
6
6
  "repository": {
@@ -19,17 +19,16 @@
19
19
  ".": "./lib/index.js"
20
20
  },
21
21
  "files": [
22
- "lib/",
23
- "!lib/**/*.map"
22
+ "lib/"
24
23
  ],
25
24
  "dependencies": {
26
- "typescript": "^5.9.3 || ^6.0.0",
27
- "@flint.fyi/typescript-language": "^0.18.3",
25
+ "typescript": "^6.0.0",
26
+ "@flint.fyi/core": "^0.23.3",
28
27
  "@flint.fyi/utils": "^0.14.1",
29
- "@flint.fyi/core": "^0.23.0"
28
+ "@flint.fyi/typescript-language": "^0.18.4"
30
29
  },
31
30
  "devDependencies": {
32
- "tsdown": "0.21.0",
31
+ "tsdown": "0.22.3",
33
32
  "vitest": "4.1.0",
34
33
  "@flint.fyi/rule-tester": "^0.16.4"
35
34
  },