@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,73 +0,0 @@
1
- import html from "@html-eslint/eslint-plugin";
2
- // @ts-nocheck
3
- import { defineConfig } from "eslint/config";
4
-
5
- import { ignores, languageOptions } from "./constants.js";
6
-
7
- export default defineConfig({
8
- files: ["**/*.html"],
9
- ignores,
10
- language: "html/html",
11
- languageOptions,
12
- plugins: {
13
- html,
14
- },
15
- rules: {
16
- "html/attrs-newline": "off",
17
- "html/element-newline": "off",
18
- "html/id-naming-convention": "error",
19
- "html/indent": "off",
20
- "html/lowercase": "error",
21
- "html/max-element-depth": "error",
22
- "html/no-abstract-roles": "error",
23
- "html/no-accesskey-attrs": "error",
24
- "html/no-aria-hidden-body": "error",
25
- "html/no-aria-hidden-on-focusable": "error",
26
- "html/no-duplicate-attrs": "error",
27
- "html/no-duplicate-class": "error",
28
- "html/no-duplicate-id": "error",
29
- "html/no-duplicate-in-head": "error",
30
- "html/no-empty-headings": "error",
31
- "html/no-extra-spacing-attrs": "off",
32
- "html/no-extra-spacing-text": "error",
33
- "html/no-heading-inside-button": "error",
34
- "html/no-ineffective-attrs": "error",
35
- "html/no-inline-styles": "error",
36
- "html/no-invalid-entity": "error",
37
- "html/no-invalid-role": "error",
38
- "html/no-multiple-empty-lines": "error",
39
- "html/no-multiple-h1": "error",
40
- "html/no-nested-interactive": "error",
41
- "html/no-non-scalable-viewport": "error",
42
- "html/no-obsolete-tags": "error",
43
- "html/no-positive-tabindex": "error",
44
- "html/no-restricted-attr-values": "error",
45
- "html/no-restricted-attrs": "error",
46
- "html/no-restricted-tags": "error",
47
- "html/no-script-style-type": "error",
48
- "html/no-skip-heading-levels": "error",
49
- "html/no-target-blank": "error",
50
- "html/no-trailing-spaces": "error",
51
- "html/no-whitespace-only-children": "error",
52
- "html/prefer-https": "error",
53
- "html/quotes": "error",
54
- "html/require-attrs": "error",
55
- "html/require-button-type": "error",
56
- "html/require-closing-tags": "off",
57
- "html/require-doctype": "error",
58
- "html/require-explicit-size": "error",
59
- "html/require-form-method": "error",
60
- "html/require-frame-title": "error",
61
- "html/require-img-alt": "error",
62
- "html/require-input-label": "error",
63
- "html/require-lang": "error",
64
- "html/require-li-container": "error",
65
- "html/require-meta-charset": "error",
66
- "html/require-meta-description": "error",
67
- "html/require-meta-viewport": "error",
68
- "html/require-open-graph-protocol": "error",
69
- "html/require-title": "error",
70
- "html/sort-attrs": "error",
71
- "html/use-baseline": "error",
72
- },
73
- });
@@ -1,111 +0,0 @@
1
- // @ts-nocheck
2
- import { defineConfig } from "eslint/config";
3
- import { ignores, languageOptions } from "./constants.js";
4
- import react from "@eslint-react/eslint-plugin";
5
- import reactHooks from "eslint-plugin-react-hooks";
6
-
7
- export default defineConfig({
8
- files: ["**/*.{jsx,tsx}"],
9
- ignores,
10
- languageOptions,
11
- settings: {
12
- react: { version: "19.2.3" },
13
- },
14
- plugins: {
15
- react: react,
16
- "react-hooks": reactHooks,
17
- },
18
- rules: {
19
- "react/jsx-dollar": "error",
20
- "react/jsx-key-before-spread": "error",
21
- "react/jsx-no-comment-textnodes": "error",
22
- "react/jsx-no-duplicate-props": "error",
23
- "react/jsx-no-iife": "error",
24
- "react/jsx-no-undef": "error",
25
- "react/jsx-shorthand-boolean": "error",
26
- "react/jsx-shorthand-fragment": "error",
27
- "react/jsx-uses-react": "error",
28
- "react/jsx-uses-vars": "error",
29
- "react/no-access-state-in-setstate": "error",
30
- "react/no-array-index-key": "error",
31
- "react/no-children-count": "error",
32
- "react/no-children-for-each": "error",
33
- "react/no-children-map": "error",
34
- "react/no-children-only": "error",
35
- "react/no-children-prop": "error",
36
- "react/no-children-to-array": "error",
37
- "react/no-class-component": "error",
38
- "react/no-clone-element": "error",
39
- "react/no-component-will-mount": "error",
40
- "react/no-component-will-receive-props": "error",
41
- "react/no-component-will-update": "error",
42
- "react/no-context-provider": "error",
43
- "react/no-create-ref": "error",
44
- "react/no-default-props": "error",
45
- "react/no-direct-mutation-state": "error",
46
- "react/no-duplicate-key": "error",
47
- "react/no-forward-ref": "error",
48
- "react/no-implicit-key": "error",
49
- "react/no-leaked-conditional-rendering": "error",
50
- "react/no-missing-component-display-name": "error",
51
- "react/no-missing-context-display-name": "error",
52
- "react/no-missing-key": "error",
53
- "react/no-misused-capture-owner-stack": "error",
54
- "react/no-nested-component-definitions": "error",
55
- "react/no-nested-lazy-component-declarations": "error",
56
- "react/no-prop-types": "error",
57
- "react/no-redundant-should-component-update": "error",
58
- "react/no-set-state-in-component-did-mount": "error",
59
- "react/no-set-state-in-component-did-update": "error",
60
- "react/no-set-state-in-component-will-update": "error",
61
- "react/no-string-refs": "error",
62
- "react/no-unnecessary-key": "error",
63
- "react/no-unnecessary-use-callback": "error",
64
- "react/no-unnecessary-use-memo": "error",
65
- "react/no-unnecessary-use-prefix": "error",
66
- "react/no-unsafe-component-will-mount": "error",
67
- "react/no-unsafe-component-will-receive-props": "error",
68
- "react/no-unsafe-component-will-update": "error",
69
- "react/no-unstable-context-value": "error",
70
- "react/no-unstable-default-props": "error",
71
- "react/no-unused-class-component-members": "error",
72
- "react/no-unused-props": "error",
73
- "react/no-unused-state": "error",
74
- "react/no-use-context": "error",
75
- "react/no-useless-forward-ref": "error",
76
- "react/no-useless-fragment": "error",
77
- "react/prefer-destructuring-assignment": "error",
78
- "react/prefer-namespace-import": "error",
79
- "react/prefer-read-only-props": "error",
80
- "react/prefer-use-state-lazy-initialization": "error",
81
- "react-hooks/automatic-effect-dependencies": "error",
82
- "react-hooks/capitalized-calls": "error",
83
- "react-hooks/component-hook-factories": "error",
84
- "react-hooks/config": "error",
85
- "react-hooks/error-boundaries": "error",
86
- "react-hooks/exhaustive-deps": "error",
87
- "react-hooks/fbt": "error",
88
- "react-hooks/fire": "error",
89
- "react-hooks/gating": "error",
90
- "react-hooks/globals": "error",
91
- "react-hooks/hooks": "error",
92
- "react-hooks/immutability": "error",
93
- "react-hooks/incompatible-library": "error",
94
- "react-hooks/invariant": "error",
95
- "react-hooks/memoized-effect-dependencies": "error",
96
- "react-hooks/no-deriving-state-in-effects": "error",
97
- "react-hooks/preserve-manual-memoization": "error",
98
- "react-hooks/purity": "error",
99
- "react-hooks/refs": "error",
100
- "react-hooks/rule-suppression": "error",
101
- "react-hooks/rules-of-hooks": "error",
102
- "react-hooks/set-state-in-effect": "error",
103
- "react-hooks/set-state-in-render": "error",
104
- "react-hooks/static-components": "error",
105
- "react-hooks/syntax": "error",
106
- "react-hooks/todo": "error",
107
- "react-hooks/unsupported-syntax": "error",
108
- "react-hooks/use-memo": "error",
109
- "react-hooks/void-use-memo": "error",
110
- },
111
- });
@@ -1,34 +0,0 @@
1
- // @ts-nocheck
2
- import { defineConfig } from "eslint/config";
3
- import { ignores, languageOptions } from "./constants.js";
4
- import solid from "eslint-plugin-solid";
5
-
6
- export default defineConfig({
7
- files: ["**/*.{jsx,tsx}"],
8
- ignores,
9
- languageOptions,
10
- plugins: {
11
- solid: solid,
12
- },
13
- rules: {
14
- "solid/components-return-once": "error",
15
- "solid/event-handlers": "error",
16
- "solid/imports": "error",
17
- "solid/jsx-no-duplicate-props": "error",
18
- "solid/jsx-no-script-url": "error",
19
- "solid/jsx-no-undef": "error",
20
- "solid/jsx-uses-vars": "error",
21
- "solid/no-array-handlers": "error",
22
- "solid/no-destructure": "error",
23
- "solid/no-innerhtml": "error",
24
- "solid/no-proxy-apis": "off",
25
- "solid/no-react-deps": "error",
26
- "solid/no-react-specific-props": "error",
27
- "solid/no-unknown-namespaces": "error",
28
- "solid/prefer-for": "error",
29
- "solid/prefer-show": "error",
30
- "solid/reactivity": "error",
31
- "solid/self-closing-comp": "error",
32
- "solid/style-prop": "error",
33
- },
34
- });
@@ -1,31 +0,0 @@
1
- // @ts-nocheck
2
- import { defineConfig } from "eslint/config";
3
- import { ignores, languageOptions } from "./constants.js";
4
- import storybook from "eslint-plugin-storybook";
5
-
6
- export default defineConfig({
7
- files: ["**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)"],
8
- ignores,
9
- languageOptions,
10
- plugins: {
11
- storybook: storybook,
12
- },
13
- rules: {
14
- "storybook/await-interactions": "error",
15
- "storybook/context-in-play-function": "error",
16
- "storybook/csf-component": "error",
17
- "storybook/default-exports": "error",
18
- "storybook/hierarchy-separator": "error",
19
- "storybook/meta-inline-properties": "error",
20
- "storybook/meta-satisfies-type": "error",
21
- "storybook/no-redundant-story-name": "error",
22
- "storybook/no-renderer-packages": "error",
23
- "storybook/no-stories-of": "error",
24
- "storybook/no-title-property-in-meta": "error",
25
- "storybook/no-uninstalled-addons": "error",
26
- "storybook/prefer-pascal-case": "error",
27
- "storybook/story-exports": "error",
28
- "storybook/use-storybook-expect": "error",
29
- "storybook/use-storybook-testing-library": "error",
30
- },
31
- });
@@ -1,28 +0,0 @@
1
- // @ts-nocheck
2
- import { defineConfig } from "eslint/config";
3
- import { ignores, languageOptions } from "./constants.js";
4
- import tailwind from "eslint-plugin-tailwindcss";
5
-
6
- const config = (/** @type {string} */ pathToConfig) => {
7
- return defineConfig({
8
- files: ["**/*.{js,ts,jsx,tsx,cjs,cts,mjs,mts}"],
9
- ignores,
10
- languageOptions,
11
- plugins: {
12
- tailwind: tailwind,
13
- },
14
- rules: {
15
- "tailwind/classnames-order": "error",
16
- "tailwind/enforces-negative-arbitrary-values": "error",
17
- "tailwind/enforces-shorthand": "error",
18
- "tailwind/migration-from-tailwind-2": "error",
19
- "tailwind/no-arbitrary-value": "off",
20
- "tailwind/no-contradicting-classname": "error",
21
- "tailwind/no-custom-classname": "off",
22
- "tailwind/no-unnecessary-arbitrary-value": "error",
23
- },
24
- settings: { tailwindcss: { config: pathToConfig } },
25
- });
26
- };
27
-
28
- export default config;
package/src/constants.js DELETED
@@ -1,16 +0,0 @@
1
- import angularTemplateParser from "@angular-eslint/template-parser";
2
- import { parser } from "typescript-eslint";
3
-
4
- export const ignores = ["eslint.config.js", "node_modules", "dist"];
5
-
6
- export const languageOptions = {
7
- parser,
8
- parserOptions: {
9
- project: true,
10
- tsconfigRootDir: import.meta.dirname,
11
- },
12
- };
13
-
14
- export const angularLanguageOptions = {
15
- parser: angularTemplateParser,
16
- };