@ethang/eslint-config 24.0.1 → 24.0.2
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/build.ts +48 -0
- package/dist/config.html.js +2 -0
- package/dist/config.html.js.map +1 -0
- package/dist/eslint.config.d.ts +4 -0
- package/dist/eslint.config.js +2 -0
- package/dist/package.json +67 -0
- package/eslint.config.js +28 -2
- package/package.json +1 -1
- package/src/README.md +132 -0
- package/src/build/create-config-file.ts +70 -0
- package/src/build/create-config.ts +98 -0
- package/src/build/get-react-version.ts +19 -0
- package/src/build/list-utilities.ts +137 -0
- package/src/build/rule-list.ts +283 -0
- package/src/build/update-readme.ts +259 -0
- package/src/build/update-rules.ts +173 -0
- package/src/config.angular.js +122 -0
- package/src/config.astro.js +69 -0
- package/src/config.html.js +73 -0
- package/src/config.react.js +111 -0
- package/src/config.solid.js +34 -0
- package/src/config.storybook.js +31 -0
- package/src/config.tailwind.js +28 -0
- package/src/constants.js +16 -0
- package/src/eslint.config.js +1075 -0
- package/src/eslint.html.js +73 -0
- package/src/setup/a11y.ts +19 -0
- package/src/setup/angular.ts +36 -0
- package/src/setup/astro.ts +14 -0
- package/src/setup/compat.ts +13 -0
- package/src/setup/cspell.ts +100 -0
- package/src/setup/css.ts +15 -0
- package/src/setup/eslint.ts +250 -0
- package/src/setup/gen-rules.ts +85 -0
- package/src/setup/html.ts +17 -0
- package/src/setup/json.ts +17 -0
- package/src/setup/lodash.ts +59 -0
- package/src/setup/markdown.ts +16 -0
- package/src/setup/perfectionist.ts +49 -0
- package/src/setup/react.ts +37 -0
- package/src/setup/solid.ts +21 -0
- package/src/setup/sonar.ts +40 -0
- package/src/setup/storybook.ts +10 -0
- package/src/setup/tailwind.ts +12 -0
- package/src/setup/tanstack-query.ts +8 -0
- package/src/setup/tanstack-router.ts +8 -0
- package/src/setup/typescript-eslint.ts +114 -0
- package/src/setup/unicorn.ts +38 -0
- package/src/tsconfig.json +3 -0
- package/tsconfig.json +3 -0
- /package/{README.md → dist/README.md} +0 -0
- /package/{chunk-WK3YS7OG.js → dist/chunk-WK3YS7OG.js} +0 -0
- /package/{chunk-WK3YS7OG.js.map → dist/chunk-WK3YS7OG.js.map} +0 -0
- /package/{config.angular.d.ts → dist/config.angular.d.ts} +0 -0
- /package/{config.angular.js → dist/config.angular.js} +0 -0
- /package/{config.angular.js.map → dist/config.angular.js.map} +0 -0
- /package/{config.astro.d.ts → dist/config.astro.d.ts} +0 -0
- /package/{config.astro.js → dist/config.astro.js} +0 -0
- /package/{config.astro.js.map → dist/config.astro.js.map} +0 -0
- /package/{config.react.d.ts → dist/config.html.d.ts} +0 -0
- /package/{config.solid.d.ts → dist/config.react.d.ts} +0 -0
- /package/{config.react.js → dist/config.react.js} +0 -0
- /package/{config.react.js.map → dist/config.react.js.map} +0 -0
- /package/{config.storybook.d.ts → dist/config.solid.d.ts} +0 -0
- /package/{config.solid.js → dist/config.solid.js} +0 -0
- /package/{config.solid.js.map → dist/config.solid.js.map} +0 -0
- /package/{eslint.config.d.ts → dist/config.storybook.d.ts} +0 -0
- /package/{config.storybook.js → dist/config.storybook.js} +0 -0
- /package/{config.storybook.js.map → dist/config.storybook.js.map} +0 -0
- /package/{config.tailwind.d.ts → dist/config.tailwind.d.ts} +0 -0
- /package/{config.tailwind.js → dist/config.tailwind.js} +0 -0
- /package/{config.tailwind.js.map → dist/config.tailwind.js.map} +0 -0
- /package/{constants.js → dist/constants.js} +0 -0
- /package/{constants.js.map → dist/constants.js.map} +0 -0
- /package/{eslint.config.js.map → dist/eslint.config.js.map} +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import isNil from "lodash/isNil.js";
|
|
2
|
+
import map from "lodash/map.js";
|
|
3
|
+
import { writeFileSync } from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
|
|
6
|
+
import type { ConfigFile } from "./update-rules.ts";
|
|
7
|
+
|
|
8
|
+
import { createConfig } from "./create-config.ts";
|
|
9
|
+
import { getTypeImportStrings } from "./list-utilities.ts";
|
|
10
|
+
|
|
11
|
+
const mainFile = "eslint.config.js";
|
|
12
|
+
|
|
13
|
+
export const createConfigFile = async (
|
|
14
|
+
listConfigs: ConfigFile[],
|
|
15
|
+
fileName: string,
|
|
16
|
+
functionParameters?: string,
|
|
17
|
+
) => {
|
|
18
|
+
let configFile = "// @ts-nocheck\n";
|
|
19
|
+
|
|
20
|
+
const imports = listConfigs.flatMap((list) => {
|
|
21
|
+
const importStrings = getTypeImportStrings(list.name);
|
|
22
|
+
|
|
23
|
+
if (list.options?.extraImports && 0 < list.options.extraImports.length) {
|
|
24
|
+
importStrings.push(...list.options.extraImports);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return importStrings;
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// eslint-disable-next-line compat/compat
|
|
31
|
+
const importList = [
|
|
32
|
+
'import { ignores, languageOptions } from "./constants.js";',
|
|
33
|
+
...imports,
|
|
34
|
+
].toSorted((a, b) => {
|
|
35
|
+
return (a ?? "").localeCompare(b ?? "");
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
for (const item of importList) {
|
|
39
|
+
configFile += `${item}\n`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const configs = await Promise.all(
|
|
43
|
+
map(listConfigs, async (list) => {
|
|
44
|
+
return createConfig(list.name, list.options);
|
|
45
|
+
}),
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
// eslint-disable-next-line unicorn/prefer-ternary
|
|
49
|
+
if (isNil(functionParameters)) {
|
|
50
|
+
configFile += `\nexport default defineConfig(
|
|
51
|
+
${configs.join("\n")}
|
|
52
|
+
${mainFile === fileName ? "eslintConfigPrettier," : ""}
|
|
53
|
+
${mainFile === fileName ? "eslintPluginPrettierRecommended," : ""}
|
|
54
|
+
);\n`;
|
|
55
|
+
} else {
|
|
56
|
+
configFile += `\nconst config = (${functionParameters}) => {
|
|
57
|
+
return defineConfig(
|
|
58
|
+
${configs.join("\n")}
|
|
59
|
+
${mainFile === fileName ? "eslintConfigPrettier," : ""}
|
|
60
|
+
${mainFile === fileName ? "eslintPluginPrettierRecommended," : ""}
|
|
61
|
+
);
|
|
62
|
+
}\n\nexport default config;\n`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
writeFileSync(
|
|
66
|
+
path.join(import.meta.dirname, `../${fileName}`),
|
|
67
|
+
configFile,
|
|
68
|
+
"utf8",
|
|
69
|
+
);
|
|
70
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import flow from "lodash/flow.js";
|
|
2
|
+
import isNil from "lodash/isNil.js";
|
|
3
|
+
import map from "lodash/map.js";
|
|
4
|
+
|
|
5
|
+
import { getLatestReact } from "./get-react-version.ts";
|
|
6
|
+
import {
|
|
7
|
+
getList,
|
|
8
|
+
getListJson,
|
|
9
|
+
getListPlugins,
|
|
10
|
+
getTypeFiles,
|
|
11
|
+
getTypeLanguage,
|
|
12
|
+
} from "./list-utilities.ts";
|
|
13
|
+
|
|
14
|
+
export type ConfigOptions = {
|
|
15
|
+
extraImports?: string[];
|
|
16
|
+
extraOptions?: string;
|
|
17
|
+
globalIgnores?: string[];
|
|
18
|
+
includeAngularLanguageOptions?: boolean;
|
|
19
|
+
includeIgnores?: boolean;
|
|
20
|
+
includeLanguageOptions?: boolean;
|
|
21
|
+
includeReactVersion?: boolean;
|
|
22
|
+
processor?: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const getIgnoresString = flow(
|
|
26
|
+
(globalIgnores: string[] | undefined) => {
|
|
27
|
+
return map(globalIgnores, (ignore) => {
|
|
28
|
+
return `"${ignore}"`;
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
(list) => list.join(", "),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
export const createConfig = async (
|
|
35
|
+
type: string,
|
|
36
|
+
options: ConfigOptions = {},
|
|
37
|
+
) => {
|
|
38
|
+
let config = "";
|
|
39
|
+
let settings;
|
|
40
|
+
|
|
41
|
+
if (!isNil(options.includeReactVersion)) {
|
|
42
|
+
const react = await getLatestReact();
|
|
43
|
+
settings = JSON.stringify({
|
|
44
|
+
react: { version: react?.version },
|
|
45
|
+
}).slice(1, -1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const list = getList(type);
|
|
49
|
+
const ruleJson = getListJson(list);
|
|
50
|
+
|
|
51
|
+
let optionals = "";
|
|
52
|
+
|
|
53
|
+
if (!isNil(options.includeIgnores)) {
|
|
54
|
+
optionals += "\nignores,";
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (
|
|
58
|
+
!isNil(options.includeLanguageOptions) &&
|
|
59
|
+
isNil(options.includeAngularLanguageOptions)
|
|
60
|
+
) {
|
|
61
|
+
optionals += "\nlanguageOptions,";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!isNil(options.includeAngularLanguageOptions)) {
|
|
65
|
+
optionals += "\nlanguageOptions: angularLanguageOptions,";
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (!isNil(options.processor)) {
|
|
69
|
+
optionals += `\nprocessor: ${options.processor},`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (!isNil(options.includeReactVersion) && !isNil(settings)) {
|
|
73
|
+
optionals += `\nsettings: {
|
|
74
|
+
${settings}
|
|
75
|
+
},`;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const language = getTypeLanguage(type);
|
|
79
|
+
|
|
80
|
+
if (options.globalIgnores) {
|
|
81
|
+
config += `{
|
|
82
|
+
ignores: [${getIgnoresString(options.globalIgnores)}],
|
|
83
|
+
},`;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
config += `{
|
|
87
|
+
files: ["${getTypeFiles(type)}"],${optionals}${language ? `language: "${language}",` : ""}
|
|
88
|
+
plugins: {
|
|
89
|
+
${getListPlugins(list)}
|
|
90
|
+
},
|
|
91
|
+
rules: {
|
|
92
|
+
${ruleJson}
|
|
93
|
+
},
|
|
94
|
+
${isNil(options.extraOptions) ? "" : options.extraOptions}
|
|
95
|
+
},`;
|
|
96
|
+
|
|
97
|
+
return config;
|
|
98
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { parseFetchJson } from "@ethang/toolbelt/fetch/json.js";
|
|
2
|
+
import isError from "lodash/isError.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
export const getLatestReact = async () => {
|
|
6
|
+
const response = await globalThis.fetch(
|
|
7
|
+
"https://registry.npmjs.org/react/latest",
|
|
8
|
+
);
|
|
9
|
+
const data = await parseFetchJson(
|
|
10
|
+
response,
|
|
11
|
+
z.object({ version: z.string() }),
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
if (isError(data)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import filter from "lodash/filter.js";
|
|
2
|
+
import flow from "lodash/flow.js";
|
|
3
|
+
import isNil from "lodash/isNil.js";
|
|
4
|
+
import map from "lodash/map.js";
|
|
5
|
+
|
|
6
|
+
import { ruleList } from "./rule-list.ts";
|
|
7
|
+
|
|
8
|
+
const filterRuleListByType = (type: string) => {
|
|
9
|
+
return filter(ruleList, (list) => {
|
|
10
|
+
return list.type === type;
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const getList = flow(filterRuleListByType, (list) => {
|
|
15
|
+
return list.toSorted((a, b) => {
|
|
16
|
+
return (a.order ?? 0) - (b.order ?? 0);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const getTypeImportStrings = flow(
|
|
21
|
+
filterRuleListByType,
|
|
22
|
+
(list) =>
|
|
23
|
+
map(list, (item) => {
|
|
24
|
+
return item.importString;
|
|
25
|
+
}),
|
|
26
|
+
(list) => filter(list, Boolean),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const getListJson = flow(
|
|
30
|
+
(list: typeof ruleList) => {
|
|
31
|
+
return map(list, (item) => {
|
|
32
|
+
return JSON.stringify(item.list).slice(1, -1);
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
(list) => list.join(","),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export const getTypeLanguage = (type: string) => {
|
|
39
|
+
switch (type) {
|
|
40
|
+
case "css": {
|
|
41
|
+
return "css/css";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
case "html": {
|
|
45
|
+
return "html/html";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
case "json": {
|
|
49
|
+
return "json/json";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
case "json5": {
|
|
53
|
+
return "json/json5";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
case "jsonc": {
|
|
57
|
+
return "json/jsonc";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
default: {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const getTypeFiles = (type: string) => {
|
|
67
|
+
switch (type) {
|
|
68
|
+
case "angular": {
|
|
69
|
+
return "**/*.ts";
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
case "angular:template": {
|
|
73
|
+
return "**/*.html";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
case "astro": {
|
|
77
|
+
return "**/*.{astro}";
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
case "core":
|
|
81
|
+
case "tailwind": {
|
|
82
|
+
return "**/*.{js,ts,jsx,tsx,cjs,cts,mjs,mts}";
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
case "css": {
|
|
86
|
+
return "**/*.css";
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
case "html": {
|
|
90
|
+
return "**/*.html";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
case "json": {
|
|
94
|
+
return "**/*.json";
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
case "json5": {
|
|
98
|
+
return "**/*.json5";
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
case "jsonc": {
|
|
102
|
+
return "**/*.jsonc";
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
case "markdown": {
|
|
106
|
+
return "**/*.md";
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
case "react": {
|
|
110
|
+
return "**/*.{jsx,tsx}";
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
case "solid": {
|
|
114
|
+
return "**/*.{jsx,tsx}";
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
case "storybook": {
|
|
118
|
+
return "**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)";
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
default: {
|
|
122
|
+
return "";
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const getListPlugins = (list: typeof ruleList) => {
|
|
128
|
+
let pluginString = "";
|
|
129
|
+
|
|
130
|
+
for (const item of list) {
|
|
131
|
+
if (!isNil(item.pluginName) && !isNil(item.pluginValue)) {
|
|
132
|
+
pluginString += `"${item.pluginName}": ${item.pluginValue},`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return pluginString;
|
|
137
|
+
};
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
|
+
|
|
3
|
+
import { a11yRules } from "../setup/a11y.ts";
|
|
4
|
+
import { angularTemplateRules, angularTsRules } from "../setup/angular.js";
|
|
5
|
+
import { astroRules } from "../setup/astro.ts";
|
|
6
|
+
import { compatRules } from "../setup/compat.ts";
|
|
7
|
+
import { cspellRules } from "../setup/cspell.js";
|
|
8
|
+
import { cssRules } from "../setup/css.js";
|
|
9
|
+
import { eslintRules } from "../setup/eslint.ts";
|
|
10
|
+
import { htmlRules } from "../setup/html.js";
|
|
11
|
+
import { jsonRules } from "../setup/json.ts";
|
|
12
|
+
import { lodashRules } from "../setup/lodash.ts";
|
|
13
|
+
import { markdownRules } from "../setup/markdown.ts";
|
|
14
|
+
import { perfectionistRules } from "../setup/perfectionist.ts";
|
|
15
|
+
import { reactHookRules, reactRules } from "../setup/react.ts";
|
|
16
|
+
import { solidRules } from "../setup/solid.ts";
|
|
17
|
+
import { sonarRules } from "../setup/sonar.ts";
|
|
18
|
+
import { storybookRules } from "../setup/storybook.js";
|
|
19
|
+
import { tailwindRules } from "../setup/tailwind.ts";
|
|
20
|
+
import { tanstackQueryRules } from "../setup/tanstack-query.ts";
|
|
21
|
+
import { tanstackRouterRules } from "../setup/tanstack-router.js";
|
|
22
|
+
import { typescriptRules } from "../setup/typescript-eslint.ts";
|
|
23
|
+
import { unicornRules } from "../setup/unicorn.ts";
|
|
24
|
+
|
|
25
|
+
const eslintJson = "@eslint/json";
|
|
26
|
+
const eslintJsonGithub = "https://github.com/eslint/json";
|
|
27
|
+
|
|
28
|
+
type RuleConfig = {
|
|
29
|
+
importString?: string | undefined;
|
|
30
|
+
list: Linter.RulesRecord;
|
|
31
|
+
name: string;
|
|
32
|
+
order?: number;
|
|
33
|
+
pluginName?: string | undefined;
|
|
34
|
+
pluginValue?: string | undefined;
|
|
35
|
+
type: string;
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const ruleList: RuleConfig[] = [
|
|
40
|
+
{
|
|
41
|
+
importString: 'import compat from "eslint-plugin-compat";',
|
|
42
|
+
list: compatRules,
|
|
43
|
+
name: "eslint-plugin-compat",
|
|
44
|
+
order: 0,
|
|
45
|
+
pluginName: "compat",
|
|
46
|
+
pluginValue: "compat",
|
|
47
|
+
type: "core",
|
|
48
|
+
url: "https://github.com/amilajack/eslint-plugin-compat",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
importString: undefined,
|
|
52
|
+
list: eslintRules,
|
|
53
|
+
name: "@eslint/js",
|
|
54
|
+
order: 1,
|
|
55
|
+
pluginName: undefined,
|
|
56
|
+
pluginValue: undefined,
|
|
57
|
+
type: "core",
|
|
58
|
+
url: "https://github.com/eslint/eslint/tree/main/packages/js",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
importString: 'import tseslint from "typescript-eslint";',
|
|
62
|
+
list: typescriptRules,
|
|
63
|
+
name: "@typescript/eslint",
|
|
64
|
+
order: 2,
|
|
65
|
+
pluginName: "@typescript-eslint",
|
|
66
|
+
pluginValue: "tseslint.plugin",
|
|
67
|
+
type: "core",
|
|
68
|
+
url: "https://github.com/typescript-eslint/typescript-eslint",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
importString: 'import unicorn from "eslint-plugin-unicorn";',
|
|
72
|
+
list: unicornRules,
|
|
73
|
+
name: "sindresorhus/eslint-plugin-unicorn",
|
|
74
|
+
order: 3,
|
|
75
|
+
pluginName: "unicorn",
|
|
76
|
+
pluginValue: "unicorn",
|
|
77
|
+
type: "core",
|
|
78
|
+
url: "https://github.com/sindresorhus/eslint-plugin-unicorn",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
importString: 'import lodashConfig from "eslint-plugin-lodash";',
|
|
82
|
+
list: lodashRules,
|
|
83
|
+
name: "eslint-plugin-lodash",
|
|
84
|
+
order: 4,
|
|
85
|
+
pluginName: "lodash",
|
|
86
|
+
pluginValue: "lodashConfig",
|
|
87
|
+
type: "core",
|
|
88
|
+
url: "https://github.com/wix-incubator/eslint-plugin-lodash",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
importString: 'import sonar from "eslint-plugin-sonarjs";',
|
|
92
|
+
list: sonarRules,
|
|
93
|
+
name: "eslint-plugin-sonarjs",
|
|
94
|
+
order: 5,
|
|
95
|
+
pluginName: "sonar",
|
|
96
|
+
pluginValue: "sonar",
|
|
97
|
+
type: "core",
|
|
98
|
+
url: "https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
importString: 'import perfectionist from "eslint-plugin-perfectionist";',
|
|
102
|
+
list: perfectionistRules,
|
|
103
|
+
name: "eslint-plugin-perfectionist",
|
|
104
|
+
order: 6,
|
|
105
|
+
pluginName: "perfectionist",
|
|
106
|
+
pluginValue: "perfectionist",
|
|
107
|
+
type: "core",
|
|
108
|
+
url: "https://github.com/azat-io/eslint-plugin-perfectionist",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
importString: 'import tanstackQuery from "@tanstack/eslint-plugin-query";',
|
|
112
|
+
list: tanstackQueryRules,
|
|
113
|
+
name: "@tanstack/eslint-plugin-query",
|
|
114
|
+
order: 7,
|
|
115
|
+
pluginName: "@tanstack/query",
|
|
116
|
+
pluginValue: "tanstackQuery",
|
|
117
|
+
type: "core",
|
|
118
|
+
url: "https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
importString:
|
|
122
|
+
'import tanstackRouter from "@tanstack/eslint-plugin-router";',
|
|
123
|
+
list: tanstackRouterRules,
|
|
124
|
+
name: "@tanstack/eslint-plugin-router",
|
|
125
|
+
order: 8,
|
|
126
|
+
pluginName: "@tanstack/router",
|
|
127
|
+
pluginValue: "tanstackRouter",
|
|
128
|
+
type: "core",
|
|
129
|
+
url: "https://tanstack.com/router/latest/docs/eslint/eslint-plugin-router",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
importString: 'import a11y from "eslint-plugin-jsx-a11y";',
|
|
133
|
+
list: a11yRules,
|
|
134
|
+
name: "jsx-a11y",
|
|
135
|
+
order: 9,
|
|
136
|
+
pluginName: "a11y",
|
|
137
|
+
pluginValue: "a11y",
|
|
138
|
+
type: "core",
|
|
139
|
+
url: "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
importString: 'import cspell from "@cspell/eslint-plugin";',
|
|
143
|
+
list: cspellRules,
|
|
144
|
+
name: "@cspell/eslint-plugin",
|
|
145
|
+
order: 10,
|
|
146
|
+
pluginName: "cspell",
|
|
147
|
+
pluginValue: "cspell",
|
|
148
|
+
type: "core",
|
|
149
|
+
url: "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-eslint-plugin",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
importString: 'import html from "@html-eslint/eslint-plugin";',
|
|
153
|
+
list: htmlRules,
|
|
154
|
+
name: "@html-eslint/eslint-plugin",
|
|
155
|
+
order: 0,
|
|
156
|
+
pluginName: "html",
|
|
157
|
+
pluginValue: "html",
|
|
158
|
+
type: "html",
|
|
159
|
+
url: "https://github.com/html-eslint/html-eslint",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
importString: "import css from '@eslint/css';",
|
|
163
|
+
list: cssRules,
|
|
164
|
+
name: "@eslint/css",
|
|
165
|
+
order: 0,
|
|
166
|
+
pluginName: "css",
|
|
167
|
+
pluginValue: "css",
|
|
168
|
+
type: "css",
|
|
169
|
+
url: "https://github.com/eslint/css",
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
importString: 'import tailwind from "eslint-plugin-tailwindcss";',
|
|
173
|
+
list: tailwindRules,
|
|
174
|
+
name: "eslint-plugin-tailwindcss",
|
|
175
|
+
order: 0,
|
|
176
|
+
pluginName: "tailwind",
|
|
177
|
+
pluginValue: "tailwind",
|
|
178
|
+
type: "tailwind",
|
|
179
|
+
url: "https://github.com/francoismassart/eslint-plugin-tailwindcss",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
importString: 'import markdown from "@eslint/markdown";',
|
|
183
|
+
list: markdownRules,
|
|
184
|
+
name: "@eslint/markdown",
|
|
185
|
+
order: 0,
|
|
186
|
+
pluginName: "markdown",
|
|
187
|
+
pluginValue: "markdown",
|
|
188
|
+
type: "markdown",
|
|
189
|
+
url: "https://github.com/eslint/markdown",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
importString: `import json from "${eslintJson}";`,
|
|
193
|
+
list: jsonRules,
|
|
194
|
+
name: eslintJson,
|
|
195
|
+
order: 0,
|
|
196
|
+
pluginName: "json",
|
|
197
|
+
pluginValue: "json",
|
|
198
|
+
type: "json",
|
|
199
|
+
url: eslintJsonGithub,
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
list: jsonRules,
|
|
203
|
+
name: eslintJson,
|
|
204
|
+
order: 0,
|
|
205
|
+
pluginName: "json",
|
|
206
|
+
pluginValue: "json",
|
|
207
|
+
type: "jsonc",
|
|
208
|
+
url: eslintJsonGithub,
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
list: jsonRules,
|
|
212
|
+
name: eslintJson,
|
|
213
|
+
order: 0,
|
|
214
|
+
pluginName: "json",
|
|
215
|
+
pluginValue: "json",
|
|
216
|
+
type: "json5",
|
|
217
|
+
url: eslintJsonGithub,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
importString: 'import astro from "eslint-plugin-astro";',
|
|
221
|
+
list: astroRules,
|
|
222
|
+
name: "eslint-plugin-astro",
|
|
223
|
+
pluginName: "astro",
|
|
224
|
+
pluginValue: "astro",
|
|
225
|
+
type: "astro",
|
|
226
|
+
url: "https://github.com/ota-meshi/eslint-plugin-astro",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
importString: 'import react from "@eslint-react/eslint-plugin";',
|
|
230
|
+
list: reactRules,
|
|
231
|
+
name: "@eslint-react/eslint-plugin",
|
|
232
|
+
pluginName: "react",
|
|
233
|
+
pluginValue: "react",
|
|
234
|
+
type: "react",
|
|
235
|
+
url: "https://eslint-react.xyz/",
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
importString: 'import reactHooks from "eslint-plugin-react-hooks";',
|
|
239
|
+
list: reactHookRules,
|
|
240
|
+
name: "eslint-plugin-react-hooks",
|
|
241
|
+
pluginName: "react-hooks",
|
|
242
|
+
pluginValue: "reactHooks",
|
|
243
|
+
type: "react",
|
|
244
|
+
url: "https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks",
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
importString: 'import solid from "eslint-plugin-solid";',
|
|
248
|
+
list: solidRules,
|
|
249
|
+
name: "eslint-plugin-solid",
|
|
250
|
+
pluginName: "solid",
|
|
251
|
+
pluginValue: "solid",
|
|
252
|
+
type: "solid",
|
|
253
|
+
url: "https://github.com/solidjs-community/eslint-plugin-solid",
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
importString: 'import angularTS from "@angular-eslint/eslint-plugin";',
|
|
257
|
+
list: angularTsRules,
|
|
258
|
+
name: "@angular-eslint/eslint-plugin",
|
|
259
|
+
pluginName: "@angular-eslint",
|
|
260
|
+
pluginValue: "angularTS",
|
|
261
|
+
type: "angular",
|
|
262
|
+
url: "https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/README.md",
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
importString:
|
|
266
|
+
'import angularTemplate from "@angular-eslint/eslint-plugin-template";',
|
|
267
|
+
list: angularTemplateRules,
|
|
268
|
+
name: "@angular-eslint/eslint-plugin-template",
|
|
269
|
+
pluginName: "@angular-eslint/template",
|
|
270
|
+
pluginValue: "angularTemplate",
|
|
271
|
+
type: "angular:template",
|
|
272
|
+
url: "https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/README.md",
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
importString: 'import storybook from "eslint-plugin-storybook";',
|
|
276
|
+
list: storybookRules,
|
|
277
|
+
name: "eslint-plugin-storybook",
|
|
278
|
+
pluginName: "storybook",
|
|
279
|
+
pluginValue: "storybook",
|
|
280
|
+
type: "storybook",
|
|
281
|
+
url: "https://github.com/storybookjs/eslint-plugin-storybook",
|
|
282
|
+
},
|
|
283
|
+
];
|