@ethang/eslint-config 21.4.0 → 21.4.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.
Files changed (62) hide show
  1. package/eslint.config.js +2 -26
  2. package/{dist/eslint.config.js.map → eslint.config.js.map} +1 -1
  3. package/package.json +1 -1
  4. package/build.ts +0 -34
  5. package/dist/eslint.config.js +0 -2
  6. package/dist/package.json +0 -68
  7. package/src/README.md +0 -100
  8. package/src/build/create-config-file.ts +0 -57
  9. package/src/build/create-config.ts +0 -96
  10. package/src/build/get-react-version.ts +0 -19
  11. package/src/build/list-utilities.ts +0 -124
  12. package/src/build/rule-list.ts +0 -284
  13. package/src/build/update-readme.ts +0 -195
  14. package/src/build/update-rules.ts +0 -124
  15. package/src/config.angular.js +0 -107
  16. package/src/config.astro.js +0 -68
  17. package/src/config.react.js +0 -117
  18. package/src/config.solid.js +0 -34
  19. package/src/constants.js +0 -16
  20. package/src/eslint.config.js +0 -1051
  21. package/src/setup/a11y.ts +0 -19
  22. package/src/setup/angular.ts +0 -40
  23. package/src/setup/astro.ts +0 -14
  24. package/src/setup/barrel.ts +0 -17
  25. package/src/setup/compat.ts +0 -13
  26. package/src/setup/cspell.ts +0 -83
  27. package/src/setup/css.ts +0 -12
  28. package/src/setup/depend.ts +0 -14
  29. package/src/setup/eslint.ts +0 -246
  30. package/src/setup/gen-rules.ts +0 -75
  31. package/src/setup/json.ts +0 -17
  32. package/src/setup/lodash.ts +0 -58
  33. package/src/setup/markdown.ts +0 -16
  34. package/src/setup/n.ts +0 -86
  35. package/src/setup/perfectionist.ts +0 -68
  36. package/src/setup/react.ts +0 -82
  37. package/src/setup/solid.ts +0 -21
  38. package/src/setup/sonar.ts +0 -39
  39. package/src/setup/tailwind.ts +0 -10
  40. package/src/setup/tanstack-query.ts +0 -9
  41. package/src/setup/tanstack-router.ts +0 -9
  42. package/src/setup/typescript-eslint.ts +0 -118
  43. package/src/setup/unicorn.ts +0 -38
  44. package/tsconfig.json +0 -5
  45. /package/{dist/README.md → README.md} +0 -0
  46. /package/{dist/chunk-WK3YS7OG.js → chunk-WK3YS7OG.js} +0 -0
  47. /package/{dist/chunk-WK3YS7OG.js.map → chunk-WK3YS7OG.js.map} +0 -0
  48. /package/{dist/config.angular.d.ts → config.angular.d.ts} +0 -0
  49. /package/{dist/config.angular.js → config.angular.js} +0 -0
  50. /package/{dist/config.angular.js.map → config.angular.js.map} +0 -0
  51. /package/{dist/config.astro.d.ts → config.astro.d.ts} +0 -0
  52. /package/{dist/config.astro.js → config.astro.js} +0 -0
  53. /package/{dist/config.astro.js.map → config.astro.js.map} +0 -0
  54. /package/{dist/config.react.d.ts → config.react.d.ts} +0 -0
  55. /package/{dist/config.react.js → config.react.js} +0 -0
  56. /package/{dist/config.react.js.map → config.react.js.map} +0 -0
  57. /package/{dist/config.solid.d.ts → config.solid.d.ts} +0 -0
  58. /package/{dist/config.solid.js → config.solid.js} +0 -0
  59. /package/{dist/config.solid.js.map → config.solid.js.map} +0 -0
  60. /package/{dist/constants.js → constants.js} +0 -0
  61. /package/{dist/constants.js.map → constants.js.map} +0 -0
  62. /package/{dist/eslint.config.d.ts → eslint.config.d.ts} +0 -0
@@ -1,107 +0,0 @@
1
- // @ts-nocheck
2
- import { angularLanguageOptions } from "./constants.js";
3
- import { ignores, languageOptions } from "./constants.js";
4
- import angular from "angular-eslint";
5
- import angularTemplate from "@angular-eslint/eslint-plugin-template";
6
- import angularTS from "@angular-eslint/eslint-plugin";
7
- import tseslint from "typescript-eslint";
8
-
9
- export default tseslint.config(
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-conflicting-lifecycle": "error",
39
- "@angular-eslint/no-duplicates-in-metadata-arrays": "error",
40
- "@angular-eslint/no-empty-lifecycle-method": "error",
41
- "@angular-eslint/no-forward-ref": "error",
42
- "@angular-eslint/no-input-prefix": "error",
43
- "@angular-eslint/no-input-rename": "error",
44
- "@angular-eslint/no-inputs-metadata-property": "error",
45
- "@angular-eslint/no-lifecycle-call": "error",
46
- "@angular-eslint/no-output-native": "error",
47
- "@angular-eslint/no-output-on-prefix": "error",
48
- "@angular-eslint/no-output-rename": "error",
49
- "@angular-eslint/no-outputs-metadata-property": "error",
50
- "@angular-eslint/no-pipe-impure": "error",
51
- "@angular-eslint/no-queries-metadata-property": "error",
52
- "@angular-eslint/pipe-prefix": "error",
53
- "@angular-eslint/prefer-on-push-component-change-detection": "error",
54
- "@angular-eslint/prefer-output-readonly": "error",
55
- "@angular-eslint/prefer-signals": "error",
56
- "@angular-eslint/prefer-standalone": "error",
57
- "@angular-eslint/relative-url-prefix": "error",
58
- "@angular-eslint/require-localize-metadata": "error",
59
- "@angular-eslint/runtime-localize": "error",
60
- "@angular-eslint/sort-lifecycle-methods": "error",
61
- "@angular-eslint/use-component-selector": "error",
62
- "@angular-eslint/use-component-view-encapsulation": "error",
63
- "@angular-eslint/use-injectable-provided-in": "error",
64
- "@angular-eslint/use-lifecycle-interface": "error",
65
- "@angular-eslint/use-pipe-transform-interface": "error",
66
- },
67
- },
68
- {
69
- files: ["**/*.html"],
70
- languageOptions: angularLanguageOptions,
71
- plugins: {
72
- "@angular-eslint/template": angularTemplate,
73
- },
74
- rules: {
75
- "@angular-eslint/template/alt-text": "error",
76
- "@angular-eslint/template/attributes-order": "error",
77
- "@angular-eslint/template/banana-in-box": "error",
78
- "@angular-eslint/template/button-has-type": "error",
79
- "@angular-eslint/template/click-events-have-key-events": "error",
80
- "@angular-eslint/template/conditional-complexity": "error",
81
- "@angular-eslint/template/cyclomatic-complexity": "error",
82
- "@angular-eslint/template/elements-content": "error",
83
- "@angular-eslint/template/eqeqeq": "error",
84
- "@angular-eslint/template/i18n": "off",
85
- "@angular-eslint/template/interactive-supports-focus": "error",
86
- "@angular-eslint/template/label-has-associated-control": "error",
87
- "@angular-eslint/template/mouse-events-have-key-events": "error",
88
- "@angular-eslint/template/no-any": "error",
89
- "@angular-eslint/template/no-autofocus": "error",
90
- "@angular-eslint/template/no-call-expression": "off",
91
- "@angular-eslint/template/no-distracting-elements": "error",
92
- "@angular-eslint/template/no-duplicate-attributes": "error",
93
- "@angular-eslint/template/no-inline-styles": "error",
94
- "@angular-eslint/template/no-interpolation-in-attributes": "error",
95
- "@angular-eslint/template/no-negated-async": "error",
96
- "@angular-eslint/template/no-positive-tabindex": "error",
97
- "@angular-eslint/template/prefer-control-flow": "error",
98
- "@angular-eslint/template/prefer-ngsrc": "warn",
99
- "@angular-eslint/template/prefer-self-closing-tags": "error",
100
- "@angular-eslint/template/prefer-static-string-properties": "error",
101
- "@angular-eslint/template/role-has-required-aria": "error",
102
- "@angular-eslint/template/table-scope": "error",
103
- "@angular-eslint/template/use-track-by-function": "error",
104
- "@angular-eslint/template/valid-aria": "error",
105
- },
106
- },
107
- );
@@ -1,68 +0,0 @@
1
- // @ts-nocheck
2
- import { ignores, languageOptions } from "./constants.js";
3
- import astro from "eslint-plugin-astro";
4
- import tseslint from "typescript-eslint";
5
-
6
- export default tseslint.config({
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-unused-css-selector": "error",
60
- "astro/no-unused-define-vars-in-style": "error",
61
- "astro/prefer-class-list-directive": "error",
62
- "astro/prefer-object-class-list": "error",
63
- "astro/prefer-split-class-list": "error",
64
- "astro/semi": "error",
65
- "astro/sort-attributes": "error",
66
- "astro/valid-compile": "error",
67
- },
68
- });
@@ -1,117 +0,0 @@
1
- // @ts-nocheck
2
- import { ignores, languageOptions } from "./constants.js";
3
- import react from "@eslint-react/eslint-plugin";
4
- import reactCompiler from "eslint-plugin-react-compiler";
5
- import reactHooks from "eslint-plugin-react-hooks";
6
- import tseslint from "typescript-eslint";
7
-
8
- export default tseslint.config({
9
- files: ["**/*.{jsx,tsx}"],
10
- ignores,
11
- languageOptions,
12
- settings: {
13
- react: { version: "19.0.0" },
14
- },
15
- plugins: {
16
- react: react,
17
- "react-hooks": reactHooks,
18
- "react-compiler": reactCompiler,
19
- },
20
- rules: {
21
- "react/avoid-shorthand-boolean": "off",
22
- "react/avoid-shorthand-fragment": "off",
23
- "react/debug/class-component": "off",
24
- "react/debug/function-component": "off",
25
- "react/debug/hook": "off",
26
- "react/debug/is-from-react": "off",
27
- "react/debug/react-hooks": "off",
28
- "react/dom/no-children-in-void-dom-elements": "error",
29
- "react/dom/no-dangerously-set-innerhtml": "error",
30
- "react/dom/no-dangerously-set-innerhtml-with-children": "error",
31
- "react/dom/no-find-dom-node": "error",
32
- "react/dom/no-flush-sync": "error",
33
- "react/dom/no-missing-button-type": "error",
34
- "react/dom/no-missing-iframe-sandbox": "error",
35
- "react/dom/no-namespace": "error",
36
- "react/dom/no-render-return-value": "error",
37
- "react/dom/no-script-url": "error",
38
- "react/dom/no-unknown-property": "error",
39
- "react/dom/no-unsafe-iframe-sandbox": "error",
40
- "react/dom/no-unsafe-target-blank": "error",
41
- "react/dom/no-void-elements-with-children": "error",
42
- "react/ensure-forward-ref-using-ref": "error",
43
- "react/hooks-extra/ensure-custom-hooks-using-other-hooks": "error",
44
- "react/hooks-extra/ensure-use-callback-has-non-empty-deps": "error",
45
- "react/hooks-extra/ensure-use-memo-has-non-empty-deps": "error",
46
- "react/hooks-extra/no-direct-set-state-in-use-effect": "error",
47
- "react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
48
- "react/hooks-extra/no-redundant-custom-hook": "error",
49
- "react/hooks-extra/no-unnecessary-use-callback": "error",
50
- "react/hooks-extra/no-unnecessary-use-memo": "error",
51
- "react/hooks-extra/no-useless-custom-hooks": "error",
52
- "react/hooks-extra/prefer-use-state-lazy-initialization": "error",
53
- "react/jsx-no-duplicate-props": "error",
54
- "react/jsx-uses-vars": "error",
55
- "react/naming-convention/component-name": "error",
56
- "react/naming-convention/filename": ["error", { rule: "kebab-case" }],
57
- "react/naming-convention/filename-extension": "error",
58
- "react/naming-convention/use-state": "error",
59
- "react/no-access-state-in-setstate": "error",
60
- "react/no-array-index-key": "error",
61
- "react/no-children-count": "error",
62
- "react/no-children-for-each": "error",
63
- "react/no-children-map": "error",
64
- "react/no-children-only": "error",
65
- "react/no-children-prop": "error",
66
- "react/no-children-to-array": "error",
67
- "react/no-class-component": "error",
68
- "react/no-clone-element": "error",
69
- "react/no-comment-textnodes": "error",
70
- "react/no-complex-conditional-rendering": "error",
71
- "react/no-complicated-conditional-rendering": "error",
72
- "react/no-component-will-mount": "error",
73
- "react/no-component-will-receive-props": "error",
74
- "react/no-component-will-update": "error",
75
- "react/no-context-provider": "error",
76
- "react/no-create-ref": "error",
77
- "react/no-default-props": "error",
78
- "react/no-direct-mutation-state": "error",
79
- "react/no-duplicate-jsx-props": "error",
80
- "react/no-duplicate-key": "error",
81
- "react/no-forward-ref": "error",
82
- "react/no-implicit-key": "error",
83
- "react/no-leaked-conditional-rendering": "error",
84
- "react/no-missing-component-display-name": "error",
85
- "react/no-missing-context-display-name": "error",
86
- "react/no-missing-key": "error",
87
- "react/no-nested-components": "error",
88
- "react/no-prop-types": "error",
89
- "react/no-redundant-should-component-update": "error",
90
- "react/no-set-state-in-component-did-mount": "error",
91
- "react/no-set-state-in-component-did-update": "error",
92
- "react/no-set-state-in-component-will-update": "error",
93
- "react/no-string-refs": "error",
94
- "react/no-unsafe-component-will-mount": "error",
95
- "react/no-unsafe-component-will-receive-props": "error",
96
- "react/no-unsafe-component-will-update": "error",
97
- "react/no-unstable-context-value": "error",
98
- "react/no-unstable-default-props": "error",
99
- "react/no-unused-class-component-members": "error",
100
- "react/no-unused-state": "error",
101
- "react/no-use-context": "error",
102
- "react/no-useless-fragment": "error",
103
- "react/prefer-destructuring-assignment": "error",
104
- "react/prefer-react-namespace-import": "error",
105
- "react/prefer-read-only-props": "error",
106
- "react/prefer-shorthand-boolean": "error",
107
- "react/prefer-shorthand-fragment": "error",
108
- "react/use-jsx-vars": "error",
109
- "react/web-api/no-leaked-event-listener": "error",
110
- "react/web-api/no-leaked-interval": "error",
111
- "react/web-api/no-leaked-resize-observer": "error",
112
- "react/web-api/no-leaked-timeout": "error",
113
- "react-hooks/exhaustive-deps": "error",
114
- "react-hooks/rules-of-hooks": "error",
115
- "react-compiler/react-compiler": "error",
116
- },
117
- });
@@ -1,34 +0,0 @@
1
- // @ts-nocheck
2
- import { ignores, languageOptions } from "./constants.js";
3
- import solid from "eslint-plugin-solid";
4
- import tseslint from "typescript-eslint";
5
-
6
- export default tseslint.config({
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
- });
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
- };