@flint.fyi/plugin-flint 0.1.0 → 0.2.1

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.
Files changed (37) hide show
  1. package/lib/findProperty.d.ts +3 -0
  2. package/lib/findProperty.js +8 -0
  3. package/lib/flint.d.ts +6 -1
  4. package/lib/flint.js +4 -2
  5. package/lib/getRuleTesterDescribedCases.d.ts +6 -0
  6. package/lib/getRuleTesterDescribedCases.js +32 -0
  7. package/lib/index.d.ts +1 -0
  8. package/lib/index.js +1 -0
  9. package/lib/parseTestCases.d.ts +5 -0
  10. package/lib/parseTestCases.js +63 -0
  11. package/lib/rules/invalidCodeLines.d.ts +7 -0
  12. package/lib/rules/invalidCodeLines.js +77 -0
  13. package/lib/rules/invalidCodeLines.test.d.ts +2 -0
  14. package/lib/rules/invalidCodeLines.test.js +198 -0
  15. package/lib/rules/ruleTester.d.ts +1 -0
  16. package/lib/rules/ruleTester.js +6 -1
  17. package/lib/rules/testCaseDuplicates.d.ts +2 -1
  18. package/lib/rules/testCaseDuplicates.js +7 -6
  19. package/lib/rules/testCaseDuplicates.test.d.ts +1 -0
  20. package/lib/rules/testCaseDuplicates.test.js +1 -0
  21. package/lib/{rules/tsAstToLiteral.d.ts → tsAstToLiteral.d.ts} +1 -0
  22. package/lib/{rules/tsAstToLiteral.js → tsAstToLiteral.js} +1 -0
  23. package/lib/types.d.ts +18 -0
  24. package/lib/types.js +2 -0
  25. package/package.json +17 -7
  26. package/CHANGELOG.md +0 -30
  27. package/lib/rules/getRuleTesterDescribedCases.d.ts +0 -9
  28. package/lib/rules/getRuleTesterDescribedCases.js +0 -59
  29. package/src/flint.ts +0 -8
  30. package/src/index.ts +0 -1
  31. package/src/rules/getRuleTesterDescribedCases.ts +0 -102
  32. package/src/rules/ruleTester.ts +0 -4
  33. package/src/rules/testCaseDuplicates.test.ts +0 -174
  34. package/src/rules/testCaseDuplicates.ts +0 -64
  35. package/src/rules/tsAstToLiteral.ts +0 -55
  36. package/tsconfig.json +0 -14
  37. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,3 @@
1
+ import * as ts from "typescript";
2
+ export declare function findProperty<Node extends ts.Node>(properties: ts.NodeArray<ts.ObjectLiteralElementLike>, name: string, predicate: (node: ts.Node) => node is Node): (ts.Expression & Node) | undefined;
3
+ //# sourceMappingURL=findProperty.d.ts.map
@@ -0,0 +1,8 @@
1
+ import * as ts from "typescript";
2
+ export function findProperty(properties, name, predicate) {
3
+ return properties.find((property) => ts.isPropertyAssignment(property) &&
4
+ ts.isIdentifier(property.name) &&
5
+ property.name.text === name &&
6
+ predicate(property.initializer))?.initializer;
7
+ }
8
+ //# sourceMappingURL=findProperty.js.map
package/lib/flint.d.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  export declare const flint: import("@flint.fyi/core").Plugin<import("@flint.fyi/core").RuleAbout, string | undefined, [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 preset: "logical";
5
+ }, import("@flint.fyi/ts").TSNodesByName, import("@flint.fyi/ts").TypeScriptFileServices, "singleLineTest", undefined>, import("@flint.fyi/core").Rule<{
2
6
  readonly description: "Reports test cases that are identical to previous test cases.";
3
7
  readonly id: "testCaseDuplicates";
4
8
  readonly preset: "logical";
5
- }, import("@flint.fyi/ts/lib/nodes.js").TSNodesByName, import("@flint.fyi/ts").TypeScriptServices, "duplicateTest", undefined>]>;
9
+ }, import("@flint.fyi/ts").TSNodesByName, import("@flint.fyi/ts").TypeScriptFileServices, "duplicateTest", undefined>]>;
10
+ //# sourceMappingURL=flint.d.ts.map
package/lib/flint.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { createPlugin } from "@flint.fyi/core";
2
+ import invalidCodeLines from "./rules/invalidCodeLines.js";
2
3
  import testCaseDuplicates from "./rules/testCaseDuplicates.js";
3
4
  export const flint = createPlugin({
4
- name: "flint",
5
- rules: [testCaseDuplicates],
5
+ name: "Flint",
6
+ rules: [invalidCodeLines, testCaseDuplicates],
6
7
  });
8
+ //# sourceMappingURL=flint.js.map
@@ -0,0 +1,6 @@
1
+ import * as ts from "typescript";
2
+ export declare function getRuleTesterDescribedCases(node: ts.CallExpression): {
3
+ invalid: import("./types.js").ParsedTestCaseInvalid[];
4
+ valid: import("./types.js").ParsedTestCase[];
5
+ } | undefined;
6
+ //# sourceMappingURL=getRuleTesterDescribedCases.d.ts.map
@@ -0,0 +1,32 @@
1
+ import { isTruthy } from "@flint.fyi/utils";
2
+ import * as ts from "typescript";
3
+ import { findProperty } from "./findProperty.js";
4
+ import { parseTestCase, parseTestCaseInvalid } from "./parseTestCases.js";
5
+ export function getRuleTesterDescribedCases(node) {
6
+ if (!ts.isPropertyAccessExpression(node.expression) ||
7
+ !ts.isIdentifier(node.expression.expression) ||
8
+ !ts.isIdentifier(node.expression.name) ||
9
+ node.expression.name.text !== "describe" ||
10
+ node.arguments.length !== 2) {
11
+ return undefined;
12
+ }
13
+ // TODO: Check node.expression.expression's type for being a RuleTester
14
+ // https://github.com/flint-fyi/flint/issues/152
15
+ const argument = node.arguments[1];
16
+ if (!ts.isObjectLiteralExpression(argument)) {
17
+ return undefined;
18
+ }
19
+ const invalid = findProperty(argument.properties, "invalid", ts.isArrayLiteralExpression);
20
+ if (!invalid) {
21
+ return undefined;
22
+ }
23
+ const valid = findProperty(argument.properties, "valid", ts.isArrayLiteralExpression);
24
+ if (!valid) {
25
+ return undefined;
26
+ }
27
+ return {
28
+ invalid: invalid.elements.map(parseTestCaseInvalid).filter(isTruthy),
29
+ valid: valid.elements.map(parseTestCase).filter(isTruthy),
30
+ };
31
+ }
32
+ //# sourceMappingURL=getRuleTesterDescribedCases.js.map
package/lib/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from "./flint.js";
2
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export * from "./flint.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,5 @@
1
+ import * as ts from "typescript";
2
+ import type { ParsedTestCase, ParsedTestCaseInvalid } from "./types.js";
3
+ export declare function parseTestCase(node: ts.Expression): ParsedTestCase | undefined;
4
+ export declare function parseTestCaseInvalid(node: ts.Expression): ParsedTestCaseInvalid | undefined;
5
+ //# sourceMappingURL=parseTestCases.d.ts.map
@@ -0,0 +1,63 @@
1
+ import * as ts from "typescript";
2
+ import { findProperty } from "./findProperty.js";
3
+ import { tsAstToLiteral } from "./tsAstToLiteral.js";
4
+ export function parseTestCase(node) {
5
+ if (ts.isStringLiteralLike(node)) {
6
+ return {
7
+ code: node.text,
8
+ nodes: {
9
+ case: node,
10
+ code: node,
11
+ },
12
+ };
13
+ }
14
+ if (!ts.isObjectLiteralExpression(node)) {
15
+ return undefined;
16
+ }
17
+ const code = findProperty(node.properties, "code", ts.isStringLiteralLike);
18
+ if (!code) {
19
+ return undefined;
20
+ }
21
+ const fileName = findProperty(node.properties, "fileName", ts.isStringLiteralLike);
22
+ const options = findProperty(node.properties, "options", ts.isObjectLiteralExpression);
23
+ return {
24
+ code: code.text,
25
+ fileName: fileName?.text,
26
+ nodes: {
27
+ case: node,
28
+ code,
29
+ fileName,
30
+ options,
31
+ },
32
+ options: options && tsAstToLiteral(options),
33
+ };
34
+ }
35
+ export function parseTestCaseInvalid(node) {
36
+ if (!ts.isObjectLiteralExpression(node)) {
37
+ return undefined;
38
+ }
39
+ const code = findProperty(node.properties, "code", ts.isStringLiteralLike);
40
+ if (!code) {
41
+ return undefined;
42
+ }
43
+ const fileName = findProperty(node.properties, "fileName", ts.isStringLiteralLike);
44
+ const options = findProperty(node.properties, "options", ts.isObjectLiteralExpression);
45
+ const snapshot = findProperty(node.properties, "snapshot", ts.isStringLiteralLike);
46
+ if (!snapshot) {
47
+ return undefined;
48
+ }
49
+ return {
50
+ code: code.text,
51
+ fileName: fileName?.text,
52
+ nodes: {
53
+ case: node,
54
+ code,
55
+ fileName,
56
+ options,
57
+ snapshot,
58
+ },
59
+ options: options && tsAstToLiteral(options),
60
+ snapshot: snapshot.text,
61
+ };
62
+ }
63
+ //# sourceMappingURL=parseTestCases.js.map
@@ -0,0 +1,7 @@
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 preset: "logical";
5
+ }, import("@flint.fyi/ts").TSNodesByName, import("@flint.fyi/ts").TypeScriptFileServices, "singleLineTest", undefined>;
6
+ export default _default;
7
+ //# sourceMappingURL=invalidCodeLines.d.ts.map
@@ -0,0 +1,77 @@
1
+ import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/ts";
2
+ import * as ts from "typescript";
3
+ import { getRuleTesterDescribedCases } from "../getRuleTesterDescribedCases.js";
4
+ export default typescriptLanguage.createRule({
5
+ about: {
6
+ description: "Reports cases for invalid code that isn't formatted across lines.",
7
+ id: "invalidCodeLines",
8
+ preset: "logical",
9
+ },
10
+ messages: {
11
+ singleLineTest: {
12
+ primary: "This code block should be formatted across multiple lines for more readable reports.",
13
+ secondary: [
14
+ "When writing `invalid` case code blocks, it's better to start code on a new line in a template literal string.",
15
+ "Doing so allows the case's `snapshot` to visualize the `~` characters visually underneath reported ranges.",
16
+ ],
17
+ suggestions: [
18
+ "Delete this redundant test case.",
19
+ "Change a property to make the test case unique.",
20
+ ],
21
+ },
22
+ },
23
+ setup(context) {
24
+ function checkTestCase(testCase, sourceFile) {
25
+ if (!testCase.code.startsWith("\n")) {
26
+ context.report({
27
+ fix: [
28
+ createFixForCode(testCase, sourceFile),
29
+ createFixForSnapshot(testCase, sourceFile),
30
+ ],
31
+ message: "singleLineTest",
32
+ range: getTSNodeRange(testCase.nodes.code, sourceFile),
33
+ });
34
+ }
35
+ }
36
+ function createFixForCode(testCase, sourceFile) {
37
+ if (ts.isStringLiteral(testCase.nodes.code)) {
38
+ return {
39
+ range: getTSNodeRange(testCase.nodes.code, sourceFile),
40
+ text: `\`\n${testCase.code}\n\``,
41
+ };
42
+ }
43
+ const begin = testCase.nodes.code.getStart(sourceFile) + 1;
44
+ return {
45
+ range: {
46
+ begin,
47
+ end: begin,
48
+ },
49
+ text: "\n",
50
+ };
51
+ }
52
+ function createFixForSnapshot(testCase, sourceFile) {
53
+ const begin = testCase.nodes.snapshot.getStart(sourceFile) + 1;
54
+ return {
55
+ range: {
56
+ begin,
57
+ end: begin,
58
+ },
59
+ text: "\n",
60
+ };
61
+ }
62
+ return {
63
+ visitors: {
64
+ CallExpression(node, { sourceFile }) {
65
+ const describedCases = getRuleTesterDescribedCases(node);
66
+ if (!describedCases) {
67
+ return;
68
+ }
69
+ describedCases.invalid.forEach((testCase) => {
70
+ checkTestCase(testCase, sourceFile);
71
+ });
72
+ },
73
+ },
74
+ };
75
+ },
76
+ });
77
+ //# sourceMappingURL=invalidCodeLines.js.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=invalidCodeLines.test.d.ts.map
@@ -0,0 +1,198 @@
1
+ import rule from "./invalidCodeLines.js";
2
+ import { ruleTester } from "./ruleTester.js";
3
+ ruleTester.describe(rule, {
4
+ invalid: [
5
+ {
6
+ code: `
7
+ ruleTester.describe(rule, {
8
+ valid: ['a', 'a'],
9
+ invalid: [
10
+ {
11
+ code: "",
12
+ snapshot: \`
13
+ ~
14
+ Rule report message.
15
+ \`,
16
+ }
17
+ ],
18
+ });
19
+ `,
20
+ output: `
21
+ ruleTester.describe(rule, {
22
+ valid: ['a', 'a'],
23
+ invalid: [
24
+ {
25
+ code: \`
26
+
27
+ \`,
28
+ snapshot: \`
29
+ ~
30
+ Rule report message.
31
+ \`,
32
+ }
33
+ ],
34
+ });
35
+ `,
36
+ snapshot: `
37
+ ruleTester.describe(rule, {
38
+ valid: ['a', 'a'],
39
+ invalid: [
40
+ {
41
+ code: "",
42
+ ~~
43
+ This code block should be formatted across multiple lines for more readable reports.
44
+ snapshot: \`
45
+ ~
46
+ Rule report message.
47
+ \`,
48
+ }
49
+ ],
50
+ });
51
+ `,
52
+ },
53
+ {
54
+ code: `
55
+ ruleTester.describe(rule, {
56
+ valid: ['a', 'a'],
57
+ invalid: [
58
+ {
59
+ code: \`console.log(
60
+ );\`,
61
+ snapshot: \`console.log(
62
+ );
63
+ ~
64
+ Rule report message.
65
+ \`,
66
+ }
67
+ ],
68
+ });
69
+ `,
70
+ output: `
71
+ ruleTester.describe(rule, {
72
+ valid: ['a', 'a'],
73
+ invalid: [
74
+ {
75
+ code: \`
76
+ console.log(
77
+ );
78
+ \`,
79
+ snapshot: \`
80
+ console.log(
81
+ );
82
+ ~
83
+ Rule report message.
84
+ \`,
85
+ }
86
+ ],
87
+ });
88
+ `,
89
+ snapshot: `
90
+ ruleTester.describe(rule, {
91
+ valid: ['a', 'a'],
92
+ invalid: [
93
+ {
94
+ code: \`console.log(
95
+ ~~~~~~~~~~~~~
96
+ This code block should be formatted across multiple lines for more readable reports.
97
+ );\`,
98
+ ~~~
99
+ snapshot: \`console.log(
100
+ );
101
+ ~
102
+ Rule report message.
103
+ \`,
104
+ }
105
+ ],
106
+ });
107
+ `,
108
+ },
109
+ {
110
+ code: `
111
+ ruleTester.describe(rule, {
112
+ valid: ['a', 'a'],
113
+ invalid: [
114
+ {
115
+ code: \`console.log();\`,
116
+ snapshot: \`console.log();
117
+ ~~~~~~~~~~~~
118
+ Rule report message.
119
+ \`,
120
+ }
121
+ ],
122
+ });
123
+ `,
124
+ output: `
125
+ ruleTester.describe(rule, {
126
+ valid: ['a', 'a'],
127
+ invalid: [
128
+ {
129
+ code: \`
130
+ console.log();
131
+ \`,
132
+ snapshot: \`
133
+ console.log();
134
+ ~~~~~~~~~~~~~
135
+ Rule report message.
136
+ \`,
137
+ }
138
+ ],
139
+ });
140
+ `,
141
+ snapshot: `
142
+ ruleTester.describe(rule, {
143
+ valid: ['a', 'a'],
144
+ invalid: [
145
+ {
146
+ code: \`console.log();\`,
147
+ ~~~~~~~~~~~~~~~~
148
+ This code block should be formatted across multiple lines for more readable reports.
149
+ snapshot: \`console.log();
150
+ ~~~~~~~~~~~~
151
+ Rule report message.
152
+ \`,
153
+ }
154
+ ],
155
+ });
156
+ `,
157
+ },
158
+ ],
159
+ valid: [
160
+ `
161
+ ruleTester.describe(rule, {
162
+ valid: [],
163
+ invalid: []
164
+ });
165
+ `,
166
+ `
167
+ ruleTester.describe(rule, {
168
+ valid: [],
169
+ invalid: [
170
+ {
171
+ code: \`
172
+ \`,
173
+ snapshot: \`
174
+ ~
175
+ \`,
176
+ }
177
+ ],
178
+ });
179
+ `,
180
+ `
181
+ ruleTester.describe(rule, {
182
+ valid: [],
183
+ invalid: [
184
+ {
185
+ code: \`
186
+ console.log();
187
+ \`,
188
+ snapshot: \`
189
+ ~~~~~~~~~~~~
190
+ Rule report message.
191
+ \`,
192
+ }
193
+ ],
194
+ });
195
+ `,
196
+ ],
197
+ });
198
+ //# sourceMappingURL=invalidCodeLines.test.js.map
@@ -1,2 +1,3 @@
1
1
  import { RuleTester } from "@flint.fyi/rule-tester";
2
2
  export declare const ruleTester: RuleTester;
3
+ //# sourceMappingURL=ruleTester.d.ts.map
@@ -1,3 +1,8 @@
1
1
  import { RuleTester } from "@flint.fyi/rule-tester";
2
2
  import { describe, it } from "vitest";
3
- export const ruleTester = new RuleTester({ describe, it });
3
+ export const ruleTester = new RuleTester({
4
+ defaults: { fileName: "file.test.ts" },
5
+ describe,
6
+ it,
7
+ });
8
+ //# sourceMappingURL=ruleTester.js.map
@@ -2,5 +2,6 @@ declare const _default: import("@flint.fyi/core").Rule<{
2
2
  readonly description: "Reports test cases that are identical to previous test cases.";
3
3
  readonly id: "testCaseDuplicates";
4
4
  readonly preset: "logical";
5
- }, import("@flint.fyi/ts/lib/nodes.js").TSNodesByName, import("@flint.fyi/ts").TypeScriptServices, "duplicateTest", undefined>;
5
+ }, import("@flint.fyi/ts").TSNodesByName, import("@flint.fyi/ts").TypeScriptFileServices, "duplicateTest", undefined>;
6
6
  export default _default;
7
+ //# sourceMappingURL=testCaseDuplicates.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/ts";
2
- import { getRuleTesterDescribedCases, } from "./getRuleTesterDescribedCases.js";
2
+ import { getRuleTesterDescribedCases } from "../getRuleTesterDescribedCases.js";
3
3
  export default typescriptLanguage.createRule({
4
4
  about: {
5
5
  description: "Reports test cases that are identical to previous test cases.",
@@ -20,7 +20,7 @@ export default typescriptLanguage.createRule({
20
20
  },
21
21
  },
22
22
  setup(context) {
23
- function checkTestCases(testCases) {
23
+ function checkTestCases(testCases, sourceFile) {
24
24
  const seen = new Set();
25
25
  for (const testCase of testCases) {
26
26
  const key = JSON.stringify({
@@ -31,7 +31,7 @@ export default typescriptLanguage.createRule({
31
31
  if (seen.has(key)) {
32
32
  context.report({
33
33
  message: "duplicateTest",
34
- range: getTSNodeRange(testCase.node, context.sourceFile),
34
+ range: getTSNodeRange(testCase.nodes.case, sourceFile),
35
35
  });
36
36
  }
37
37
  else {
@@ -41,15 +41,16 @@ export default typescriptLanguage.createRule({
41
41
  }
42
42
  return {
43
43
  visitors: {
44
- CallExpression(node) {
44
+ CallExpression(node, { sourceFile }) {
45
45
  const describedCases = getRuleTesterDescribedCases(node);
46
46
  if (!describedCases) {
47
47
  return;
48
48
  }
49
- checkTestCases(describedCases.invalid);
50
- checkTestCases(describedCases.valid);
49
+ checkTestCases(describedCases.invalid, sourceFile);
50
+ checkTestCases(describedCases.valid, sourceFile);
51
51
  },
52
52
  },
53
53
  };
54
54
  },
55
55
  });
56
+ //# sourceMappingURL=testCaseDuplicates.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=testCaseDuplicates.test.d.ts.map
@@ -171,3 +171,4 @@ ruleTester.describe(rule, {
171
171
  `,
172
172
  ],
173
173
  });
174
+ //# sourceMappingURL=testCaseDuplicates.test.js.map
@@ -2,3 +2,4 @@ import ts from "typescript";
2
2
  export declare function tsAstToLiteral(node: ts.ArrayLiteralExpression): unknown[];
3
3
  export declare function tsAstToLiteral(node: ts.ObjectLiteralExpression): object;
4
4
  export declare function tsAstToLiteral(node: ts.Node): unknown;
5
+ //# sourceMappingURL=tsAstToLiteral.d.ts.map
@@ -35,3 +35,4 @@ export function tsAstToLiteral(node) {
35
35
  }
36
36
  return undefined;
37
37
  }
38
+ //# sourceMappingURL=tsAstToLiteral.js.map
package/lib/types.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import type { InvalidTestCase, TestCase } from "@flint.fyi/rule-tester";
2
+ import * as ts from "typescript";
3
+ export interface ParsedTestCase extends TestCase {
4
+ nodes: ParsedTestCaseNodes;
5
+ }
6
+ export interface ParsedTestCaseInvalid extends InvalidTestCase {
7
+ nodes: ParsedTestCaseNodesInvalid;
8
+ }
9
+ export interface ParsedTestCaseNodes {
10
+ case: ts.Node;
11
+ code: ts.StringLiteralLike;
12
+ fileName?: ts.StringLiteralLike;
13
+ options?: ts.ObjectLiteralExpression;
14
+ }
15
+ export interface ParsedTestCaseNodesInvalid extends ParsedTestCaseNodes {
16
+ snapshot: ts.Node;
17
+ }
18
+ //# sourceMappingURL=types.d.ts.map
package/lib/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@flint.fyi/plugin-flint",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "[Experimental] A Flint plugin for linting Flint plugins.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "https://github.com/JoshuaKGoldberg/flint",
7
+ "url": "git+https://github.com/flint-fyi/flint.git",
8
8
  "directory": "packages/plugin-flint"
9
9
  },
10
10
  "license": "MIT",
@@ -12,19 +12,29 @@
12
12
  "name": "JoshuaKGoldberg",
13
13
  "email": "npm@joshuakgoldberg.com"
14
14
  },
15
+ "sideEffects": false,
15
16
  "type": "module",
16
- "main": "./lib/index.js",
17
+ "exports": {
18
+ ".": "./lib/index.js"
19
+ },
20
+ "files": [
21
+ "lib/",
22
+ "!lib/**/*.map"
23
+ ],
17
24
  "dependencies": {
18
25
  "@flint.fyi/core": "",
19
- "@flint.fyi/rule-tester": "",
20
26
  "@flint.fyi/ts": "",
21
- "@flint.fyi/utils": ""
27
+ "@flint.fyi/utils": "",
28
+ "typescript": "^5.9.3"
29
+ },
30
+ "devDependencies": {
31
+ "@flint.fyi/rule-tester": "",
32
+ "vitest": "4.0.15"
22
33
  },
23
34
  "engines": {
24
35
  "node": ">=24.0.0"
25
36
  },
26
37
  "publishConfig": {
27
- "access": "public",
28
- "provenance": true
38
+ "access": "public"
29
39
  }
30
40
  }
package/CHANGELOG.md DELETED
@@ -1,30 +0,0 @@
1
- # @flint.fyi/plugin-flint
2
-
3
- ## 0.1.0
4
-
5
- ### Minor Changes
6
-
7
- - d89c480: feat(comparisons): add eslint-plugin-eslint-plugin comparisons
8
-
9
- ### Patch Changes
10
-
11
- - Updated dependencies [738fe36]
12
- - @flint.fyi/rule-tester@0.14.3
13
-
14
- ## 0.0.2
15
-
16
- ### Patch Changes
17
-
18
- - 0b80834: allow rules to indicate dependencies
19
- - 63b61e5: add --suggestions to CLI
20
- - Updated dependencies [0b80834]
21
- - Updated dependencies [63b61e5]
22
- - @flint.fyi/core@0.13.5
23
- - @flint.fyi/ts@0.13.2
24
- - @flint.fyi/utils@0.13.2
25
-
26
- ## 0.0.1
27
-
28
- ### Patch Changes
29
-
30
- - 83a4361: initial functionality
@@ -1,9 +0,0 @@
1
- import { TestCase } from "@flint.fyi/rule-tester";
2
- import * as ts from "typescript";
3
- export interface ParsedTestCase extends TestCase {
4
- node: ts.Node;
5
- }
6
- export declare function getRuleTesterDescribedCases(node: ts.CallExpression): {
7
- invalid: ParsedTestCase[];
8
- valid: ParsedTestCase[];
9
- } | undefined;