@ethang/eslint-config 24.0.2 → 24.0.3

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 (75) hide show
  1. package/eslint.config.js +2 -28
  2. package/package.json +1 -1
  3. package/build.ts +0 -48
  4. package/dist/eslint.config.js +0 -2
  5. package/dist/package.json +0 -67
  6. package/src/README.md +0 -132
  7. package/src/build/create-config-file.ts +0 -70
  8. package/src/build/create-config.ts +0 -98
  9. package/src/build/get-react-version.ts +0 -19
  10. package/src/build/list-utilities.ts +0 -137
  11. package/src/build/rule-list.ts +0 -283
  12. package/src/build/update-readme.ts +0 -259
  13. package/src/build/update-rules.ts +0 -173
  14. package/src/config.angular.js +0 -122
  15. package/src/config.astro.js +0 -69
  16. package/src/config.html.js +0 -73
  17. package/src/config.react.js +0 -111
  18. package/src/config.solid.js +0 -34
  19. package/src/config.storybook.js +0 -31
  20. package/src/config.tailwind.js +0 -28
  21. package/src/constants.js +0 -16
  22. package/src/eslint.config.js +0 -1075
  23. package/src/eslint.html.js +0 -73
  24. package/src/setup/a11y.ts +0 -19
  25. package/src/setup/angular.ts +0 -36
  26. package/src/setup/astro.ts +0 -14
  27. package/src/setup/compat.ts +0 -13
  28. package/src/setup/cspell.ts +0 -100
  29. package/src/setup/css.ts +0 -15
  30. package/src/setup/eslint.ts +0 -250
  31. package/src/setup/gen-rules.ts +0 -85
  32. package/src/setup/html.ts +0 -17
  33. package/src/setup/json.ts +0 -17
  34. package/src/setup/lodash.ts +0 -59
  35. package/src/setup/markdown.ts +0 -16
  36. package/src/setup/perfectionist.ts +0 -49
  37. package/src/setup/react.ts +0 -37
  38. package/src/setup/solid.ts +0 -21
  39. package/src/setup/sonar.ts +0 -40
  40. package/src/setup/storybook.ts +0 -10
  41. package/src/setup/tailwind.ts +0 -12
  42. package/src/setup/tanstack-query.ts +0 -8
  43. package/src/setup/tanstack-router.ts +0 -8
  44. package/src/setup/typescript-eslint.ts +0 -114
  45. package/src/setup/unicorn.ts +0 -38
  46. package/src/tsconfig.json +0 -3
  47. package/tsconfig.json +0 -3
  48. /package/{dist/README.md → README.md} +0 -0
  49. /package/{dist/chunk-WK3YS7OG.js → chunk-WK3YS7OG.js} +0 -0
  50. /package/{dist/chunk-WK3YS7OG.js.map → chunk-WK3YS7OG.js.map} +0 -0
  51. /package/{dist/config.angular.d.ts → config.angular.d.ts} +0 -0
  52. /package/{dist/config.angular.js → config.angular.js} +0 -0
  53. /package/{dist/config.angular.js.map → config.angular.js.map} +0 -0
  54. /package/{dist/config.astro.d.ts → config.astro.d.ts} +0 -0
  55. /package/{dist/config.astro.js → config.astro.js} +0 -0
  56. /package/{dist/config.astro.js.map → config.astro.js.map} +0 -0
  57. /package/{dist/config.html.d.ts → config.html.d.ts} +0 -0
  58. /package/{dist/config.html.js → config.html.js} +0 -0
  59. /package/{dist/config.html.js.map → config.html.js.map} +0 -0
  60. /package/{dist/config.react.d.ts → config.react.d.ts} +0 -0
  61. /package/{dist/config.react.js → config.react.js} +0 -0
  62. /package/{dist/config.react.js.map → config.react.js.map} +0 -0
  63. /package/{dist/config.solid.d.ts → config.solid.d.ts} +0 -0
  64. /package/{dist/config.solid.js → config.solid.js} +0 -0
  65. /package/{dist/config.solid.js.map → config.solid.js.map} +0 -0
  66. /package/{dist/config.storybook.d.ts → config.storybook.d.ts} +0 -0
  67. /package/{dist/config.storybook.js → config.storybook.js} +0 -0
  68. /package/{dist/config.storybook.js.map → config.storybook.js.map} +0 -0
  69. /package/{dist/config.tailwind.d.ts → config.tailwind.d.ts} +0 -0
  70. /package/{dist/config.tailwind.js → config.tailwind.js} +0 -0
  71. /package/{dist/config.tailwind.js.map → config.tailwind.js.map} +0 -0
  72. /package/{dist/constants.js → constants.js} +0 -0
  73. /package/{dist/constants.js.map → constants.js.map} +0 -0
  74. /package/{dist/eslint.config.d.ts → eslint.config.d.ts} +0 -0
  75. /package/{dist/eslint.config.js.map → eslint.config.js.map} +0 -0
@@ -1,16 +0,0 @@
1
- import markdown from "@eslint/markdown";
2
- import isNil from "lodash/isNil.js";
3
- import keys from "lodash/keys.js";
4
-
5
- import {
6
- type CustomRules,
7
- genRules,
8
- getNonDeprecatedRules,
9
- } from "./gen-rules.ts";
10
-
11
- const ruleNames = keys(
12
- getNonDeprecatedRules(isNil(markdown.rules) ? {} : markdown.rules),
13
- );
14
- const customRules: CustomRules = [];
15
-
16
- export const markdownRules = genRules(ruleNames, customRules, "markdown");
@@ -1,49 +0,0 @@
1
- import perfectionist from "eslint-plugin-perfectionist";
2
- import keys from "lodash/keys.js";
3
-
4
- import {
5
- type EsLintRules,
6
- genRules,
7
- getNonDeprecatedRules,
8
- } from "./gen-rules.ts";
9
-
10
- const ruleNames = keys(
11
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
12
- getNonDeprecatedRules(perfectionist.rules as unknown as EsLintRules),
13
- );
14
- const customRules = [
15
- {
16
- name: "sort-jsx-props",
17
- rule: ["error", { groups: ["shorthand", "multiline"] }],
18
- },
19
- {
20
- name: "sort-objects",
21
- rule: ["error", { partitionByComment: true }],
22
- },
23
- {
24
- name: "sort-switch-case",
25
- rule: [
26
- "error",
27
- {
28
- order: "asc",
29
- type: "alphabetical",
30
- },
31
- ],
32
- },
33
- {
34
- name: "sort-variable-declarations",
35
- rule: [
36
- "error",
37
- {
38
- order: "asc",
39
- type: "alphabetical",
40
- },
41
- ],
42
- },
43
- ];
44
-
45
- export const perfectionistRules = genRules(
46
- ruleNames,
47
- customRules,
48
- "perfectionist",
49
- );
@@ -1,37 +0,0 @@
1
- import react from "@eslint-react/eslint-plugin";
2
- import reactHooks from "eslint-plugin-react-hooks";
3
- import keys from "lodash/keys.js";
4
-
5
- import {
6
- type EsLintRules,
7
- genRules,
8
- getNonDeprecatedRules,
9
- } from "./gen-rules.ts";
10
-
11
- const reactRuleNames = keys(
12
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
13
- getNonDeprecatedRules(react.rules as unknown as EsLintRules),
14
- );
15
- const reactGen = genRules(reactRuleNames, [], "react");
16
-
17
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
18
- const reactHookRuleNames = keys(reactHooks.rules as unknown as EsLintRules);
19
- const customHookRules = [
20
- {
21
- name: "exhaustive-deps",
22
- rule: "error",
23
- },
24
- {
25
- name: "rules-of-hooks",
26
- rule: "error",
27
- },
28
- ];
29
- const hookGen = genRules(reactHookRuleNames, customHookRules, "react-hooks");
30
-
31
- export const reactRules = {
32
- ...reactGen,
33
- };
34
-
35
- export const reactHookRules = {
36
- ...hookGen,
37
- };
@@ -1,21 +0,0 @@
1
- import solid from "eslint-plugin-solid";
2
- import keys from "lodash/keys.js";
3
-
4
- import {
5
- type EsLintRules,
6
- genRules,
7
- getNonDeprecatedRules,
8
- } from "./gen-rules.ts";
9
-
10
- const ruleNames = keys(
11
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
12
- getNonDeprecatedRules(solid.rules as unknown as EsLintRules),
13
- );
14
- const customRules = [
15
- {
16
- name: "no-proxy-apis",
17
- rule: "off",
18
- },
19
- ];
20
-
21
- export const solidRules = genRules(ruleNames, customRules, "solid");
@@ -1,40 +0,0 @@
1
- import sonar from "eslint-plugin-sonarjs";
2
- import keys from "lodash/keys.js";
3
-
4
- import { genRules, getNonDeprecatedRules } from "./gen-rules.ts";
5
-
6
- const ruleNames = keys(getNonDeprecatedRules(sonar.rules));
7
- const customRules = [
8
- { name: "arrow-function-convention", rule: "off" },
9
- { name: "comment-regex", rule: "off" },
10
- { name: "cyclomatic-complexity", rule: "off" },
11
- { name: "file-header", rule: "off" },
12
- {
13
- name: "function-name",
14
- rule: [
15
- "error",
16
- {
17
- format: "^(?:[a-z][a-zA-Z0-9]*|[A-Z][A-Z0-9]*)$",
18
- },
19
- ],
20
- },
21
- { name: "function-return-type", rule: "off" },
22
- { name: "max-union-size", rule: "off" },
23
- { name: "no-implicit-dependencies", rule: "off" },
24
- { name: "no-inconsistent-returns", rule: "off" },
25
- { name: "no-undefined-assignment", rule: "off" },
26
- { name: "shorthand-property-grouping", rule: "off" }, // Conflicts with perfectionist sorting
27
- { name: "todo-tag", rule: "off" },
28
- { name: "no-reference-error", rule: "off" },
29
- ];
30
-
31
- const rules = genRules(ruleNames, customRules, "sonar");
32
-
33
- // Turn off duplicate S# rules
34
- for (const key of keys(rules)) {
35
- if (/^sonar\/S\d+/u.test(key)) {
36
- rules[key] = "off";
37
- }
38
- }
39
-
40
- export const sonarRules = rules;
@@ -1,10 +0,0 @@
1
- import storybook from "eslint-plugin-storybook";
2
- import keys from "lodash/keys.js";
3
-
4
- import { genRules, getNonDeprecatedRules } from "./gen-rules.js";
5
-
6
- const ruleNames = keys(getNonDeprecatedRules(storybook.rules));
7
-
8
- const rules = genRules(ruleNames, [], "storybook");
9
-
10
- export const storybookRules = rules;
@@ -1,12 +0,0 @@
1
- import tailwind from "eslint-plugin-tailwindcss";
2
- import keys from "lodash/keys.js";
3
-
4
- import { genRules, getNonDeprecatedRules } from "./gen-rules.ts";
5
-
6
- const ruleNames = keys(getNonDeprecatedRules(tailwind.rules ?? {}));
7
- const customRules = [
8
- { name: "no-custom-classname", rule: "off" },
9
- { name: "no-arbitrary-value", rule: "off" },
10
- ];
11
-
12
- export const tailwindRules = genRules(ruleNames, customRules, "tailwind");
@@ -1,8 +0,0 @@
1
- import tanstack from "@tanstack/eslint-plugin-query";
2
- import keys from "lodash/keys.js";
3
-
4
- import { genRules, getNonDeprecatedRules } from "./gen-rules.ts";
5
-
6
- const ruleNames = keys(getNonDeprecatedRules(tanstack.rules));
7
-
8
- export const tanstackQueryRules = genRules(ruleNames, [], "@tanstack/query");
@@ -1,8 +0,0 @@
1
- import tanstack from "@tanstack/eslint-plugin-router";
2
- import keys from "lodash/keys.js";
3
-
4
- import { genRules, getNonDeprecatedRules } from "./gen-rules.js";
5
-
6
- const ruleNames = keys(getNonDeprecatedRules(tanstack.rules));
7
-
8
- export const tanstackRouterRules = genRules(ruleNames, [], "@tanstack/router");
@@ -1,114 +0,0 @@
1
- import keys from "lodash/keys.js";
2
- import tseslint from "typescript-eslint";
3
-
4
- import {
5
- type EsLintRules,
6
- genRules,
7
- getNonDeprecatedRules,
8
- } from "./gen-rules.ts";
9
-
10
- const ruleNames = keys(
11
- getNonDeprecatedRules(
12
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
13
- (tseslint.plugin.rules ?? {}) as unknown as EsLintRules,
14
- ),
15
- );
16
- const customRules = [
17
- {
18
- name: "adjacent-overload-signatures",
19
- rule: "off",
20
- },
21
- {
22
- name: "class-methods-use-this",
23
- rule: "off",
24
- },
25
- {
26
- name: "consistent-return",
27
- rule: "off",
28
- },
29
- {
30
- name: "consistent-type-definitions",
31
- rule: ["error", "type"],
32
- },
33
- {
34
- name: "consistent-type-imports",
35
- rule: ["error", { fixStyle: "inline-type-imports" }],
36
- },
37
- {
38
- name: "explicit-function-return-type",
39
- rule: "off",
40
- },
41
- {
42
- name: "explicit-module-boundary-types",
43
- rule: "off",
44
- },
45
- {
46
- name: "init-declarations",
47
- rule: "off",
48
- },
49
- {
50
- name: "member-ordering",
51
- rule: "off",
52
- },
53
- {
54
- name: "naming-convention",
55
- rule: "off",
56
- },
57
- {
58
- name: "no-dupe-class-members",
59
- rule: "off",
60
- },
61
- {
62
- name: "no-invalid-this",
63
- rule: "off",
64
- },
65
- {
66
- name: "no-magic-numbers",
67
- rule: "off",
68
- },
69
- {
70
- name: "no-redeclare",
71
- rule: "off",
72
- },
73
- {
74
- name: "no-unnecessary-type-parameters",
75
- rule: "off",
76
- },
77
- {
78
- name: "no-use-before-define",
79
- rule: "off",
80
- },
81
- {
82
- name: "parameter-properties",
83
- rule: "off",
84
- },
85
- {
86
- name: "prefer-readonly-parameter-types",
87
- rule: "off",
88
- },
89
- {
90
- name: "max-params",
91
- rule: "off",
92
- },
93
- {
94
- name: "no-unused-vars",
95
- rule: [
96
- "error",
97
- {
98
- args: "all",
99
- argsIgnorePattern: "^_",
100
- caughtErrors: "all",
101
- caughtErrorsIgnorePattern: "^_",
102
- destructuredArrayIgnorePattern: "^_",
103
- ignoreRestSiblings: true,
104
- varsIgnorePattern: "^_",
105
- },
106
- ],
107
- },
108
- ];
109
-
110
- export const typescriptRules = genRules(
111
- ruleNames,
112
- customRules,
113
- "@typescript-eslint",
114
- );
@@ -1,38 +0,0 @@
1
- import unicorn from "eslint-plugin-unicorn";
2
- import keys from "lodash/keys.js";
3
-
4
- import { genRules, getNonDeprecatedRules } from "./gen-rules.ts";
5
-
6
- const ruleNames = keys(getNonDeprecatedRules(unicorn.rules ?? {}));
7
- const customRules = [
8
- {
9
- name: "empty-brace-spaces",
10
- rule: "off",
11
- },
12
- {
13
- name: "explicit-length-check",
14
- rule: "off",
15
- },
16
- {
17
- name: "no-keyword-prefix",
18
- rule: "off",
19
- },
20
- {
21
- name: "no-nested-ternary",
22
- rule: "off",
23
- },
24
- {
25
- name: "no-null",
26
- rule: "off",
27
- },
28
- {
29
- name: "number-literal-case",
30
- rule: "off",
31
- },
32
- {
33
- name: "template-indent",
34
- rule: "off",
35
- },
36
- ];
37
-
38
- export const unicornRules = genRules(ruleNames, customRules, "unicorn");
package/src/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["../../tsconfig/tsconfig.base.json"]
3
- }
package/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["../tsconfig/tsconfig.base.json"]
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes