@ethang/eslint-config 24.0.2 → 24.1.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.
Files changed (76) hide show
  1. package/{dist/README.md → README.md} +3 -3
  2. package/eslint.config.js +2 -28
  3. package/eslint.config.js.map +1 -0
  4. package/package.json +10 -10
  5. package/build.ts +0 -48
  6. package/dist/eslint.config.js +0 -2
  7. package/dist/eslint.config.js.map +0 -1
  8. package/dist/package.json +0 -67
  9. package/src/README.md +0 -132
  10. package/src/build/create-config-file.ts +0 -70
  11. package/src/build/create-config.ts +0 -98
  12. package/src/build/get-react-version.ts +0 -19
  13. package/src/build/list-utilities.ts +0 -137
  14. package/src/build/rule-list.ts +0 -283
  15. package/src/build/update-readme.ts +0 -259
  16. package/src/build/update-rules.ts +0 -173
  17. package/src/config.angular.js +0 -122
  18. package/src/config.astro.js +0 -69
  19. package/src/config.html.js +0 -73
  20. package/src/config.react.js +0 -111
  21. package/src/config.solid.js +0 -34
  22. package/src/config.storybook.js +0 -31
  23. package/src/config.tailwind.js +0 -28
  24. package/src/constants.js +0 -16
  25. package/src/eslint.config.js +0 -1075
  26. package/src/eslint.html.js +0 -73
  27. package/src/setup/a11y.ts +0 -19
  28. package/src/setup/angular.ts +0 -36
  29. package/src/setup/astro.ts +0 -14
  30. package/src/setup/compat.ts +0 -13
  31. package/src/setup/cspell.ts +0 -100
  32. package/src/setup/css.ts +0 -15
  33. package/src/setup/eslint.ts +0 -250
  34. package/src/setup/gen-rules.ts +0 -85
  35. package/src/setup/html.ts +0 -17
  36. package/src/setup/json.ts +0 -17
  37. package/src/setup/lodash.ts +0 -59
  38. package/src/setup/markdown.ts +0 -16
  39. package/src/setup/perfectionist.ts +0 -49
  40. package/src/setup/react.ts +0 -37
  41. package/src/setup/solid.ts +0 -21
  42. package/src/setup/sonar.ts +0 -40
  43. package/src/setup/storybook.ts +0 -10
  44. package/src/setup/tailwind.ts +0 -12
  45. package/src/setup/tanstack-query.ts +0 -8
  46. package/src/setup/tanstack-router.ts +0 -8
  47. package/src/setup/typescript-eslint.ts +0 -114
  48. package/src/setup/unicorn.ts +0 -38
  49. package/src/tsconfig.json +0 -3
  50. package/tsconfig.json +0 -3
  51. /package/{dist/chunk-WK3YS7OG.js → chunk-WK3YS7OG.js} +0 -0
  52. /package/{dist/chunk-WK3YS7OG.js.map → chunk-WK3YS7OG.js.map} +0 -0
  53. /package/{dist/config.angular.d.ts → config.angular.d.ts} +0 -0
  54. /package/{dist/config.angular.js → config.angular.js} +0 -0
  55. /package/{dist/config.angular.js.map → config.angular.js.map} +0 -0
  56. /package/{dist/config.astro.d.ts → config.astro.d.ts} +0 -0
  57. /package/{dist/config.astro.js → config.astro.js} +0 -0
  58. /package/{dist/config.astro.js.map → config.astro.js.map} +0 -0
  59. /package/{dist/config.html.d.ts → config.html.d.ts} +0 -0
  60. /package/{dist/config.html.js → config.html.js} +0 -0
  61. /package/{dist/config.html.js.map → config.html.js.map} +0 -0
  62. /package/{dist/config.react.d.ts → config.react.d.ts} +0 -0
  63. /package/{dist/config.react.js → config.react.js} +0 -0
  64. /package/{dist/config.react.js.map → config.react.js.map} +0 -0
  65. /package/{dist/config.solid.d.ts → config.solid.d.ts} +0 -0
  66. /package/{dist/config.solid.js → config.solid.js} +0 -0
  67. /package/{dist/config.solid.js.map → config.solid.js.map} +0 -0
  68. /package/{dist/config.storybook.d.ts → config.storybook.d.ts} +0 -0
  69. /package/{dist/config.storybook.js → config.storybook.js} +0 -0
  70. /package/{dist/config.storybook.js.map → config.storybook.js.map} +0 -0
  71. /package/{dist/config.tailwind.d.ts → config.tailwind.d.ts} +0 -0
  72. /package/{dist/config.tailwind.js → config.tailwind.js} +0 -0
  73. /package/{dist/config.tailwind.js.map → config.tailwind.js.map} +0 -0
  74. /package/{dist/constants.js → constants.js} +0 -0
  75. /package/{dist/constants.js.map → constants.js.map} +0 -0
  76. /package/{dist/eslint.config.d.ts → eslint.config.d.ts} +0 -0
@@ -1,173 +0,0 @@
1
- import type { ConfigOptions } from "./create-config.ts";
2
-
3
- import { createConfigFile } from "./create-config-file.ts";
4
-
5
- export type ConfigFile = {
6
- importString?: string;
7
- label?: string;
8
- name: string;
9
- options?: ConfigOptions;
10
- };
11
-
12
- const defineConfig = 'import { defineConfig } from "eslint/config";';
13
-
14
- export const coreFile = [
15
- {
16
- importString: 'import config from "@ethang/eslint-config/eslint.config.js',
17
- label: "Core",
18
- name: "core",
19
- options: {
20
- extraImports: [
21
- defineConfig,
22
- 'import eslintConfigPrettier from "eslint-config-prettier";',
23
- 'import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";',
24
- ],
25
- includeIgnores: true,
26
- includeLanguageOptions: true,
27
- includeReactVersion: true,
28
- },
29
- },
30
- {
31
- name: "markdown",
32
- },
33
- {
34
- name: "css",
35
- },
36
- {
37
- name: "json",
38
- },
39
- {
40
- name: "jsonc",
41
- },
42
- {
43
- name: "json5",
44
- },
45
- ];
46
-
47
- export const htmlFile = [
48
- {
49
- importString: "@html-eslint/eslint-plugin",
50
- label: "HTML",
51
- name: "html",
52
- options: {
53
- extraImports: [defineConfig],
54
- includeIgnores: true,
55
- includeLanguageOptions: true,
56
- },
57
- },
58
- ];
59
-
60
- const astroFile = [
61
- {
62
- importString:
63
- 'import astroConfig from "@ethang/eslint-config/config.astro.ts',
64
- label: "Astro",
65
- name: "astro",
66
- options: {
67
- extraImports: [defineConfig],
68
- includeIgnores: true,
69
- includeLanguageOptions: true,
70
- },
71
- },
72
- ];
73
-
74
- const reactFile = [
75
- {
76
- importString:
77
- 'import reactConfig from "@ethang/eslint-config/config.react.ts',
78
- label: "React",
79
- name: "react",
80
- options: {
81
- extraImports: [defineConfig],
82
- includeIgnores: true,
83
- includeLanguageOptions: true,
84
- includeReactVersion: true,
85
- },
86
- },
87
- ];
88
-
89
- const solidFile = [
90
- {
91
- importString:
92
- 'import solidConfig from "@ethang/eslint-config/config.solid.ts',
93
- label: "Solid",
94
- name: "solid",
95
- options: {
96
- extraImports: [defineConfig],
97
- includeIgnores: true,
98
- includeLanguageOptions: true,
99
- },
100
- },
101
- ];
102
-
103
- const angularFile = [
104
- {
105
- importString:
106
- 'import angularConfig from "@ethang/eslint-config/config.angular.ts',
107
- label: "Angular",
108
- name: "angular",
109
- options: {
110
- extraImports: [defineConfig, 'import angular from "angular-eslint";'],
111
- globalIgnores: ["**/*.spec.ts", "src/main.server.ts"],
112
- includeIgnores: true,
113
- includeLanguageOptions: true,
114
- processor: "angular.processInlineTemplates",
115
- },
116
- },
117
- {
118
- name: "angular:template",
119
- options: {
120
- extraImports: ['import { angularLanguageOptions } from "./constants.js"'],
121
- includeAngularLanguageOptions: true,
122
- includeLanguageOptions: false,
123
- },
124
- },
125
- ];
126
-
127
- const storybookFile = [
128
- {
129
- importString:
130
- 'import storybookConfig from "@ethang/eslint-config/config.storybook.ts',
131
- label: "Storybook",
132
- name: "storybook",
133
- options: {
134
- extraImports: [defineConfig],
135
- includeIgnores: true,
136
- includeLanguageOptions: true,
137
- },
138
- },
139
- ];
140
-
141
- const tailwindFile = [
142
- {
143
- importString:
144
- 'import tailwindConfig from "@ethang/eslint-config/config.tailwind.ts',
145
- label: "Tailwind",
146
- name: "tailwind",
147
- options: {
148
- extraImports: [defineConfig],
149
- extraOptions: "settings: { tailwindcss: { config: pathToConfig } },",
150
- includeIgnores: true,
151
- includeLanguageOptions: true,
152
- },
153
- },
154
- ];
155
-
156
- export const updateRules = async () => {
157
- await Promise.all([
158
- createConfigFile(coreFile, "eslint.config.js"),
159
- createConfigFile(htmlFile, "config.html.js"),
160
- createConfigFile(astroFile, "config.astro.js"),
161
- createConfigFile(reactFile, "config.react.js"),
162
- createConfigFile(solidFile, "config.solid.js"),
163
- createConfigFile(angularFile, "config.angular.js"),
164
- createConfigFile(storybookFile, "config.storybook.js"),
165
- createConfigFile(
166
- tailwindFile,
167
- "config.tailwind.js",
168
- "/** @type {string} */ pathToConfig",
169
- ),
170
- ]);
171
- };
172
-
173
- await updateRules();
@@ -1,122 +0,0 @@
1
- // @ts-nocheck
2
- import { angularLanguageOptions } from "./constants.js";
3
- import { defineConfig } from "eslint/config";
4
- import { ignores, languageOptions } from "./constants.js";
5
- import angular from "angular-eslint";
6
- import angularTemplate from "@angular-eslint/eslint-plugin-template";
7
- import angularTS from "@angular-eslint/eslint-plugin";
8
-
9
- export default defineConfig(
10
- {
11
- ignores: ["**/*.spec.ts", "src/main.server.ts"],
12
- },
13
- {
14
- files: ["**/*.ts"],
15
- ignores,
16
- languageOptions,
17
- processor: angular.processInlineTemplates,
18
- plugins: {
19
- "@angular-eslint": angularTS,
20
- },
21
- rules: {
22
- "@angular-eslint/component-class-suffix": "error",
23
- "@angular-eslint/component-max-inline-declarations": "error",
24
- "@angular-eslint/component-selector": [
25
- "error",
26
- { prefix: "app", style: "kebab-case", type: "element" },
27
- ],
28
- "@angular-eslint/consistent-component-styles": "error",
29
- "@angular-eslint/contextual-decorator": "error",
30
- "@angular-eslint/contextual-lifecycle": "error",
31
- "@angular-eslint/directive-class-suffix": "error",
32
- "@angular-eslint/directive-selector": [
33
- "error",
34
- { prefix: "app", style: "camelCase", type: "attribute" },
35
- ],
36
- "@angular-eslint/no-async-lifecycle-method": "error",
37
- "@angular-eslint/no-attribute-decorator": "error",
38
- "@angular-eslint/no-developer-preview": "error",
39
- "@angular-eslint/no-duplicates-in-metadata-arrays": "error",
40
- "@angular-eslint/no-empty-lifecycle-method": "error",
41
- "@angular-eslint/no-experimental": "error",
42
- "@angular-eslint/no-forward-ref": "error",
43
- "@angular-eslint/no-input-prefix": "error",
44
- "@angular-eslint/no-input-rename": "error",
45
- "@angular-eslint/no-inputs-metadata-property": "error",
46
- "@angular-eslint/no-lifecycle-call": "error",
47
- "@angular-eslint/no-output-native": "error",
48
- "@angular-eslint/no-output-on-prefix": "error",
49
- "@angular-eslint/no-output-rename": "error",
50
- "@angular-eslint/no-outputs-metadata-property": "error",
51
- "@angular-eslint/no-pipe-impure": "error",
52
- "@angular-eslint/no-queries-metadata-property": "error",
53
- "@angular-eslint/no-uncalled-signals": "error",
54
- "@angular-eslint/pipe-prefix": "error",
55
- "@angular-eslint/prefer-host-metadata-property": "error",
56
- "@angular-eslint/prefer-inject": "error",
57
- "@angular-eslint/prefer-on-push-component-change-detection": "error",
58
- "@angular-eslint/prefer-output-emitter-ref": "error",
59
- "@angular-eslint/prefer-output-readonly": "error",
60
- "@angular-eslint/prefer-signal-model": "error",
61
- "@angular-eslint/prefer-signals": "error",
62
- "@angular-eslint/prefer-standalone": "error",
63
- "@angular-eslint/relative-url-prefix": "error",
64
- "@angular-eslint/require-lifecycle-on-prototype": "error",
65
- "@angular-eslint/require-localize-metadata": "error",
66
- "@angular-eslint/runtime-localize": "error",
67
- "@angular-eslint/sort-keys-in-type-decorator": "error",
68
- "@angular-eslint/sort-lifecycle-methods": "error",
69
- "@angular-eslint/use-component-selector": "error",
70
- "@angular-eslint/use-component-view-encapsulation": "error",
71
- "@angular-eslint/use-injectable-provided-in": "error",
72
- "@angular-eslint/use-lifecycle-interface": "error",
73
- "@angular-eslint/use-pipe-transform-interface": "error",
74
- },
75
- },
76
- {
77
- files: ["**/*.html"],
78
- languageOptions: angularLanguageOptions,
79
- plugins: {
80
- "@angular-eslint/template": angularTemplate,
81
- },
82
- rules: {
83
- "@angular-eslint/template/alt-text": "error",
84
- "@angular-eslint/template/attributes-order": "error",
85
- "@angular-eslint/template/banana-in-box": "error",
86
- "@angular-eslint/template/button-has-type": "error",
87
- "@angular-eslint/template/click-events-have-key-events": "error",
88
- "@angular-eslint/template/conditional-complexity": "error",
89
- "@angular-eslint/template/cyclomatic-complexity": "error",
90
- "@angular-eslint/template/elements-content": "error",
91
- "@angular-eslint/template/eqeqeq": "error",
92
- "@angular-eslint/template/i18n": "off",
93
- "@angular-eslint/template/interactive-supports-focus": "error",
94
- "@angular-eslint/template/label-has-associated-control": "error",
95
- "@angular-eslint/template/mouse-events-have-key-events": "error",
96
- "@angular-eslint/template/no-any": "error",
97
- "@angular-eslint/template/no-autofocus": "error",
98
- "@angular-eslint/template/no-call-expression": "off",
99
- "@angular-eslint/template/no-distracting-elements": "error",
100
- "@angular-eslint/template/no-duplicate-attributes": "error",
101
- "@angular-eslint/template/no-empty-control-flow": "error",
102
- "@angular-eslint/template/no-inline-styles": "error",
103
- "@angular-eslint/template/no-interpolation-in-attributes": "error",
104
- "@angular-eslint/template/no-negated-async": "error",
105
- "@angular-eslint/template/no-nested-tags": "error",
106
- "@angular-eslint/template/no-positive-tabindex": "error",
107
- "@angular-eslint/template/prefer-at-else": "error",
108
- "@angular-eslint/template/prefer-at-empty": "error",
109
- "@angular-eslint/template/prefer-built-in-pipes": "error",
110
- "@angular-eslint/template/prefer-contextual-for-variables": "error",
111
- "@angular-eslint/template/prefer-control-flow": "error",
112
- "@angular-eslint/template/prefer-ngsrc": "warn",
113
- "@angular-eslint/template/prefer-self-closing-tags": "error",
114
- "@angular-eslint/template/prefer-static-string-properties": "error",
115
- "@angular-eslint/template/prefer-template-literal": "error",
116
- "@angular-eslint/template/role-has-required-aria": "error",
117
- "@angular-eslint/template/table-scope": "error",
118
- "@angular-eslint/template/use-track-by-function": "error",
119
- "@angular-eslint/template/valid-aria": "error",
120
- },
121
- },
122
- );
@@ -1,69 +0,0 @@
1
- // @ts-nocheck
2
- import { defineConfig } from "eslint/config";
3
- import { ignores, languageOptions } from "./constants.js";
4
- import astro from "eslint-plugin-astro";
5
-
6
- export default defineConfig({
7
- files: ["**/*.{astro}"],
8
- ignores,
9
- languageOptions,
10
- plugins: {
11
- astro: astro,
12
- },
13
- rules: {
14
- "astro/jsx-a11y/alt-text": "error",
15
- "astro/jsx-a11y/anchor-ambiguous-text": "error",
16
- "astro/jsx-a11y/anchor-has-content": "error",
17
- "astro/jsx-a11y/anchor-is-valid": "error",
18
- "astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
19
- "astro/jsx-a11y/aria-props": "error",
20
- "astro/jsx-a11y/aria-proptypes": "error",
21
- "astro/jsx-a11y/aria-role": "error",
22
- "astro/jsx-a11y/aria-unsupported-elements": "error",
23
- "astro/jsx-a11y/autocomplete-valid": "error",
24
- "astro/jsx-a11y/click-events-have-key-events": "error",
25
- "astro/jsx-a11y/control-has-associated-label": "error",
26
- "astro/jsx-a11y/heading-has-content": "error",
27
- "astro/jsx-a11y/html-has-lang": "error",
28
- "astro/jsx-a11y/iframe-has-title": "error",
29
- "astro/jsx-a11y/img-redundant-alt": "error",
30
- "astro/jsx-a11y/interactive-supports-focus": "error",
31
- "astro/jsx-a11y/label-has-associated-control": "error",
32
- "astro/jsx-a11y/lang": "error",
33
- "astro/jsx-a11y/media-has-caption": "error",
34
- "astro/jsx-a11y/mouse-events-have-key-events": "error",
35
- "astro/jsx-a11y/no-access-key": "error",
36
- "astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
37
- "astro/jsx-a11y/no-autofocus": "error",
38
- "astro/jsx-a11y/no-distracting-elements": "error",
39
- "astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
40
- "astro/jsx-a11y/no-noninteractive-element-interactions": "error",
41
- "astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
42
- "astro/jsx-a11y/no-noninteractive-tabindex": "error",
43
- "astro/jsx-a11y/no-redundant-roles": "error",
44
- "astro/jsx-a11y/no-static-element-interactions": "error",
45
- "astro/jsx-a11y/prefer-tag-over-role": "error",
46
- "astro/jsx-a11y/role-has-required-aria-props": "error",
47
- "astro/jsx-a11y/role-supports-aria-props": "error",
48
- "astro/jsx-a11y/scope": "error",
49
- "astro/jsx-a11y/tabindex-no-positive": "error",
50
- "astro/missing-client-only-directive-value": "error",
51
- "astro/no-conflict-set-directives": "error",
52
- "astro/no-deprecated-astro-canonicalurl": "error",
53
- "astro/no-deprecated-astro-fetchcontent": "error",
54
- "astro/no-deprecated-astro-resolve": "error",
55
- "astro/no-deprecated-getentrybyslug": "error",
56
- "astro/no-exports-from-components": "error",
57
- "astro/no-set-html-directive": "off",
58
- "astro/no-set-text-directive": "error",
59
- "astro/no-unsafe-inline-scripts": "error",
60
- "astro/no-unused-css-selector": "error",
61
- "astro/no-unused-define-vars-in-style": "error",
62
- "astro/prefer-class-list-directive": "error",
63
- "astro/prefer-object-class-list": "error",
64
- "astro/prefer-split-class-list": "error",
65
- "astro/semi": "error",
66
- "astro/sort-attributes": "error",
67
- "astro/valid-compile": "error",
68
- },
69
- });
@@ -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
- };