@flint.fyi/rule-data 0.4.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 +9 -0
- package/dist/index.d.mts +111 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +29346 -0
- package/dist/index.mjs +29411 -0
- package/package.json +92 -0
package/README.md
ADDED
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { AnyRule } from "@flint.fyi/core";
|
|
3
|
+
|
|
4
|
+
//#region src/getRuleForPlugin.d.ts
|
|
5
|
+
declare function getRuleForPlugin(pluginId: string, ruleId: string): AnyRule;
|
|
6
|
+
declare function getRuleForPluginSafe(pluginId: string, ruleId: string): AnyRule | undefined;
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/ruleData.d.ts
|
|
9
|
+
type LinterName = "biome" | "deno" | "eslint" | "markdownlint" | "oxlint" | "stylelint";
|
|
10
|
+
declare function getFlintRuleId(pluginId: string, ruleId: string): string;
|
|
11
|
+
declare const linterNames: {
|
|
12
|
+
readonly biome: "Biome";
|
|
13
|
+
readonly deno: "Deno";
|
|
14
|
+
readonly eslint: "ESLint";
|
|
15
|
+
readonly markdownlint: "Markdownlint";
|
|
16
|
+
readonly oxlint: "Oxlint";
|
|
17
|
+
readonly stylelint: "Stylelint";
|
|
18
|
+
};
|
|
19
|
+
declare const ruleData: {
|
|
20
|
+
flint: {
|
|
21
|
+
name: string;
|
|
22
|
+
plugin: "astro" | "browser" | "css" | "flint" | "json" | "jsx" | "md" | "node" | "package-json" | "performance" | "spelling" | "ts" | "vitest" | "yaml" | "security" | "drizzle" | "graphql" | "jest" | "next" | "nuxt" | "playwright" | "qwik" | "react" | "react-native" | "solid" | "svelte" | "vue";
|
|
23
|
+
status: "skipped";
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
plugin: "astro" | "browser" | "css" | "flint" | "json" | "jsx" | "md" | "node" | "package-json" | "performance" | "spelling" | "ts" | "vitest" | "yaml" | "security" | "drizzle" | "graphql" | "jest" | "next" | "nuxt" | "playwright" | "qwik" | "react" | "react-native" | "solid" | "svelte" | "vue";
|
|
27
|
+
preset?: "javascript" | "logical" | "stylistic" | "sorting" | "security" | "config" | "none" | undefined;
|
|
28
|
+
status?: "implemented" | undefined;
|
|
29
|
+
strictness?: "strict" | undefined;
|
|
30
|
+
};
|
|
31
|
+
biome?: {
|
|
32
|
+
name: string;
|
|
33
|
+
url: string;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
deno?: {
|
|
36
|
+
name: string;
|
|
37
|
+
url: string;
|
|
38
|
+
}[] | undefined;
|
|
39
|
+
eslint?: {
|
|
40
|
+
name: string;
|
|
41
|
+
url: string;
|
|
42
|
+
}[] | undefined;
|
|
43
|
+
markdownlint?: {
|
|
44
|
+
name: string;
|
|
45
|
+
url: string;
|
|
46
|
+
}[] | undefined;
|
|
47
|
+
notes?: string | undefined;
|
|
48
|
+
oxlint?: {
|
|
49
|
+
name: string;
|
|
50
|
+
url: string;
|
|
51
|
+
}[] | undefined;
|
|
52
|
+
stylelint?: {
|
|
53
|
+
name: string;
|
|
54
|
+
url: string;
|
|
55
|
+
}[] | undefined;
|
|
56
|
+
}[];
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/schemas.d.ts
|
|
59
|
+
declare const flintRuleReferenceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
plugin: z.ZodUnion<readonly [z.ZodLiteral<"astro">, z.ZodLiteral<"browser">, z.ZodLiteral<"css">, z.ZodLiteral<"drizzle">, z.ZodLiteral<"flint">, z.ZodLiteral<"graphql">, z.ZodLiteral<"json">, z.ZodLiteral<"jest">, z.ZodLiteral<"jsx">, z.ZodLiteral<"md">, z.ZodLiteral<"next">, z.ZodLiteral<"node">, z.ZodLiteral<"nuxt">, z.ZodLiteral<"package-json">, z.ZodLiteral<"performance">, z.ZodLiteral<"playwright">, z.ZodLiteral<"qwik">, z.ZodLiteral<"react">, z.ZodLiteral<"react-native">, z.ZodLiteral<"security">, z.ZodLiteral<"solid">, z.ZodLiteral<"spelling">, z.ZodLiteral<"svelte">, z.ZodLiteral<"ts">, z.ZodLiteral<"vitest">, z.ZodLiteral<"vue">, z.ZodLiteral<"yaml">]>;
|
|
62
|
+
status: z.ZodLiteral<"skipped">;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
plugin: z.ZodUnion<readonly [z.ZodLiteral<"astro">, z.ZodLiteral<"browser">, z.ZodLiteral<"css">, z.ZodLiteral<"drizzle">, z.ZodLiteral<"flint">, z.ZodLiteral<"graphql">, z.ZodLiteral<"json">, z.ZodLiteral<"jest">, z.ZodLiteral<"jsx">, z.ZodLiteral<"md">, z.ZodLiteral<"next">, z.ZodLiteral<"node">, z.ZodLiteral<"nuxt">, z.ZodLiteral<"package-json">, z.ZodLiteral<"performance">, z.ZodLiteral<"playwright">, z.ZodLiteral<"qwik">, z.ZodLiteral<"react">, z.ZodLiteral<"react-native">, z.ZodLiteral<"security">, z.ZodLiteral<"solid">, z.ZodLiteral<"spelling">, z.ZodLiteral<"svelte">, z.ZodLiteral<"ts">, z.ZodLiteral<"vitest">, z.ZodLiteral<"vue">, z.ZodLiteral<"yaml">]>;
|
|
66
|
+
preset: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"config">, z.ZodLiteral<"javascript">, z.ZodLiteral<"logical">, z.ZodLiteral<"none">, z.ZodLiteral<"security">, z.ZodLiteral<"sorting">, z.ZodLiteral<"stylistic">]>>;
|
|
67
|
+
status: z.ZodOptional<z.ZodLiteral<"implemented">>;
|
|
68
|
+
strictness: z.ZodOptional<z.ZodLiteral<"strict">>;
|
|
69
|
+
}, z.core.$strict>]>;
|
|
70
|
+
type FlintRuleReference = z.infer<typeof flintRuleReferenceSchema>;
|
|
71
|
+
type RuleDetails = z.infer<typeof ruleDetailsSchema>;
|
|
72
|
+
declare const ruleDetailsSchema: z.ZodObject<{
|
|
73
|
+
biome: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
url: z.ZodURL;
|
|
76
|
+
}, z.core.$strict>>>;
|
|
77
|
+
deno: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
url: z.ZodURL;
|
|
80
|
+
}, z.core.$strict>>>;
|
|
81
|
+
eslint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
url: z.ZodURL;
|
|
84
|
+
}, z.core.$strict>>>;
|
|
85
|
+
flint: z.ZodUnion<readonly [z.ZodObject<{
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
plugin: z.ZodUnion<readonly [z.ZodLiteral<"astro">, z.ZodLiteral<"browser">, z.ZodLiteral<"css">, z.ZodLiteral<"drizzle">, z.ZodLiteral<"flint">, z.ZodLiteral<"graphql">, z.ZodLiteral<"json">, z.ZodLiteral<"jest">, z.ZodLiteral<"jsx">, z.ZodLiteral<"md">, z.ZodLiteral<"next">, z.ZodLiteral<"node">, z.ZodLiteral<"nuxt">, z.ZodLiteral<"package-json">, z.ZodLiteral<"performance">, z.ZodLiteral<"playwright">, z.ZodLiteral<"qwik">, z.ZodLiteral<"react">, z.ZodLiteral<"react-native">, z.ZodLiteral<"security">, z.ZodLiteral<"solid">, z.ZodLiteral<"spelling">, z.ZodLiteral<"svelte">, z.ZodLiteral<"ts">, z.ZodLiteral<"vitest">, z.ZodLiteral<"vue">, z.ZodLiteral<"yaml">]>;
|
|
88
|
+
status: z.ZodLiteral<"skipped">;
|
|
89
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
90
|
+
name: z.ZodString;
|
|
91
|
+
plugin: z.ZodUnion<readonly [z.ZodLiteral<"astro">, z.ZodLiteral<"browser">, z.ZodLiteral<"css">, z.ZodLiteral<"drizzle">, z.ZodLiteral<"flint">, z.ZodLiteral<"graphql">, z.ZodLiteral<"json">, z.ZodLiteral<"jest">, z.ZodLiteral<"jsx">, z.ZodLiteral<"md">, z.ZodLiteral<"next">, z.ZodLiteral<"node">, z.ZodLiteral<"nuxt">, z.ZodLiteral<"package-json">, z.ZodLiteral<"performance">, z.ZodLiteral<"playwright">, z.ZodLiteral<"qwik">, z.ZodLiteral<"react">, z.ZodLiteral<"react-native">, z.ZodLiteral<"security">, z.ZodLiteral<"solid">, z.ZodLiteral<"spelling">, z.ZodLiteral<"svelte">, z.ZodLiteral<"ts">, z.ZodLiteral<"vitest">, z.ZodLiteral<"vue">, z.ZodLiteral<"yaml">]>;
|
|
92
|
+
preset: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"config">, z.ZodLiteral<"javascript">, z.ZodLiteral<"logical">, z.ZodLiteral<"none">, z.ZodLiteral<"security">, z.ZodLiteral<"sorting">, z.ZodLiteral<"stylistic">]>>;
|
|
93
|
+
status: z.ZodOptional<z.ZodLiteral<"implemented">>;
|
|
94
|
+
strictness: z.ZodOptional<z.ZodLiteral<"strict">>;
|
|
95
|
+
}, z.core.$strict>]>;
|
|
96
|
+
markdownlint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
url: z.ZodURL;
|
|
99
|
+
}, z.core.$strict>>>;
|
|
100
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
101
|
+
oxlint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
url: z.ZodURL;
|
|
104
|
+
}, z.core.$strict>>>;
|
|
105
|
+
stylelint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
url: z.ZodURL;
|
|
108
|
+
}, z.core.$strict>>>;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
//#endregion
|
|
111
|
+
export { type FlintRuleReference, type LinterName, type RuleDetails, getFlintRuleId, getRuleForPlugin, getRuleForPluginSafe, linterNames, ruleData };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import { AnyRule } from "@flint.fyi/core";
|
|
3
|
+
|
|
4
|
+
//#region src/schemas.d.ts
|
|
5
|
+
declare const linterNameSchema: z.ZodUnion<readonly [z.ZodLiteral<"biome">, z.ZodLiteral<"deno">, z.ZodLiteral<"eslint">, z.ZodLiteral<"markdownlint">, z.ZodLiteral<"oxlint">, z.ZodLiteral<"stylelint">]>;
|
|
6
|
+
type LinterName = z.infer<typeof linterNameSchema>;
|
|
7
|
+
declare const flintRuleReferenceSchema: z.ZodObject<{
|
|
8
|
+
name: z.ZodUnion<readonly [z.ZodLiteral<"biome">, z.ZodLiteral<"deno">, z.ZodLiteral<"eslint">, z.ZodLiteral<"markdownlint">, z.ZodLiteral<"oxlint">, z.ZodLiteral<"stylelint">]>;
|
|
9
|
+
plugin: z.ZodString;
|
|
10
|
+
preset: z.ZodString;
|
|
11
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"implemented">, z.ZodLiteral<"skipped">]>>;
|
|
12
|
+
strictness: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
type FlintRuleReference = z.infer<typeof flintRuleReferenceSchema>;
|
|
15
|
+
declare const comparisonSchema: z.ZodObject<{
|
|
16
|
+
biome: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
url: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
deno: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
url: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
eslint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
url: z.ZodString;
|
|
27
|
+
}, z.core.$strip>>>;
|
|
28
|
+
flint: z.ZodObject<{
|
|
29
|
+
name: z.ZodUnion<readonly [z.ZodLiteral<"biome">, z.ZodLiteral<"deno">, z.ZodLiteral<"eslint">, z.ZodLiteral<"markdownlint">, z.ZodLiteral<"oxlint">, z.ZodLiteral<"stylelint">]>;
|
|
30
|
+
plugin: z.ZodString;
|
|
31
|
+
preset: z.ZodString;
|
|
32
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"implemented">, z.ZodLiteral<"skipped">]>>;
|
|
33
|
+
strictness: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
markdownlint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
url: z.ZodString;
|
|
38
|
+
}, z.core.$strip>>>;
|
|
39
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
40
|
+
oxlint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
url: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
stylelint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
url: z.ZodString;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
type Comparison = z.infer<typeof comparisonSchema>;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/comparisons.d.ts
|
|
52
|
+
declare function getComparisonId(pluginId: string, ruleId: string): string;
|
|
53
|
+
declare const linterNames: {
|
|
54
|
+
readonly biome: "Biome";
|
|
55
|
+
readonly deno: "Deno";
|
|
56
|
+
readonly eslint: "ESLint";
|
|
57
|
+
readonly markdownlint: "Markdownlint";
|
|
58
|
+
readonly oxlint: "Oxlint";
|
|
59
|
+
readonly stylelint: "Stylelint";
|
|
60
|
+
};
|
|
61
|
+
declare const comparisons: Comparison[];
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/getRuleForPlugin.d.ts
|
|
64
|
+
declare function getRuleForPlugin(pluginId: string, ruleId: string): AnyRule;
|
|
65
|
+
declare function getRuleForPluginSafe(pluginId: string, ruleId: string): AnyRule | undefined;
|
|
66
|
+
//#endregion
|
|
67
|
+
export { type Comparison, type FlintRuleReference, type LinterName, comparisons, getComparisonId, getRuleForPlugin, getRuleForPluginSafe, linterNames };
|