@ethang/eslint-config 18.4.0 → 18.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.
package/config.astro.js CHANGED
@@ -4,61 +4,61 @@ import tseslint from "typescript-eslint";
4
4
  import {ignores, languageOptions} from "./eslint.config.js";
5
5
 
6
6
  export default tseslint.config({
7
- "files": ["**/*.{astro}"],
8
- ignores,
9
- languageOptions,
10
- "plugins": {astro},
11
- "rules": {
12
- "astro/jsx-a11y/alt-text": "error",
13
- "astro/jsx-a11y/anchor-ambiguous-text": "error",
14
- "astro/jsx-a11y/anchor-has-content": "error",
15
- "astro/jsx-a11y/anchor-is-valid": "error",
16
- "astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
17
- "astro/jsx-a11y/aria-props": "error",
18
- "astro/jsx-a11y/aria-proptypes": "error",
19
- "astro/jsx-a11y/aria-role": "error",
20
- "astro/jsx-a11y/aria-unsupported-elements": "error",
21
- "astro/jsx-a11y/autocomplete-valid": "error",
22
- "astro/jsx-a11y/click-events-have-key-events": "error",
23
- "astro/jsx-a11y/control-has-associated-label": "error",
24
- "astro/jsx-a11y/heading-has-content": "error",
25
- "astro/jsx-a11y/html-has-lang": "error",
26
- "astro/jsx-a11y/iframe-has-title": "error",
27
- "astro/jsx-a11y/img-redundant-alt": "error",
28
- "astro/jsx-a11y/interactive-supports-focus": "error",
29
- "astro/jsx-a11y/label-has-associated-control": "error",
30
- "astro/jsx-a11y/lang": "error",
31
- "astro/jsx-a11y/media-has-caption": "error",
32
- "astro/jsx-a11y/mouse-events-have-key-events": "error",
33
- "astro/jsx-a11y/no-access-key": "error",
34
- "astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
35
- "astro/jsx-a11y/no-autofocus": "error",
36
- "astro/jsx-a11y/no-distracting-elements": "error",
37
- "astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
38
- "astro/jsx-a11y/no-noninteractive-element-interactions": "error",
39
- "astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
40
- "astro/jsx-a11y/no-noninteractive-tabindex": "error",
41
- "astro/jsx-a11y/no-redundant-roles": "error",
42
- "astro/jsx-a11y/no-static-element-interactions": "error",
43
- "astro/jsx-a11y/prefer-tag-over-role": "error",
44
- "astro/jsx-a11y/role-has-required-aria-props": "error",
45
- "astro/jsx-a11y/role-supports-aria-props": "error",
46
- "astro/jsx-a11y/scope": "error",
47
- "astro/jsx-a11y/tabindex-no-positive": "error",
48
- "astro/missing-client-only-directive-value": "error",
49
- "astro/no-conflict-set-directives": "error",
50
- "astro/no-deprecated-astro-canonicalurl": "error",
51
- "astro/no-deprecated-astro-fetchcontent": "error",
52
- "astro/no-deprecated-astro-resolve": "error",
53
- "astro/no-deprecated-getentrybyslug": "error",
54
- "astro/no-exports-from-components": "error",
55
- "astro/no-set-text-directive": "error",
56
- "astro/no-unused-css-selector": "error",
57
- "astro/no-unused-define-vars-in-style": "error",
58
- "astro/prefer-class-list-directive": "error",
59
- "astro/prefer-object-class-list": "error",
60
- "astro/prefer-split-class-list": "error",
61
- "astro/semi": "error",
62
- "astro/valid-compile": "error",
63
- },
7
+ "files": ["**/*.{astro}"],
8
+ ignores,
9
+ languageOptions,
10
+ "plugins": {astro},
11
+ "rules": {
12
+ "astro/jsx-a11y/alt-text": "error",
13
+ "astro/jsx-a11y/anchor-ambiguous-text": "error",
14
+ "astro/jsx-a11y/anchor-has-content": "error",
15
+ "astro/jsx-a11y/anchor-is-valid": "error",
16
+ "astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
17
+ "astro/jsx-a11y/aria-props": "error",
18
+ "astro/jsx-a11y/aria-proptypes": "error",
19
+ "astro/jsx-a11y/aria-role": "error",
20
+ "astro/jsx-a11y/aria-unsupported-elements": "error",
21
+ "astro/jsx-a11y/autocomplete-valid": "error",
22
+ "astro/jsx-a11y/click-events-have-key-events": "error",
23
+ "astro/jsx-a11y/control-has-associated-label": "error",
24
+ "astro/jsx-a11y/heading-has-content": "error",
25
+ "astro/jsx-a11y/html-has-lang": "error",
26
+ "astro/jsx-a11y/iframe-has-title": "error",
27
+ "astro/jsx-a11y/img-redundant-alt": "error",
28
+ "astro/jsx-a11y/interactive-supports-focus": "error",
29
+ "astro/jsx-a11y/label-has-associated-control": "error",
30
+ "astro/jsx-a11y/lang": "error",
31
+ "astro/jsx-a11y/media-has-caption": "error",
32
+ "astro/jsx-a11y/mouse-events-have-key-events": "error",
33
+ "astro/jsx-a11y/no-access-key": "error",
34
+ "astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
35
+ "astro/jsx-a11y/no-autofocus": "error",
36
+ "astro/jsx-a11y/no-distracting-elements": "error",
37
+ "astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
38
+ "astro/jsx-a11y/no-noninteractive-element-interactions": "error",
39
+ "astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
40
+ "astro/jsx-a11y/no-noninteractive-tabindex": "error",
41
+ "astro/jsx-a11y/no-redundant-roles": "error",
42
+ "astro/jsx-a11y/no-static-element-interactions": "error",
43
+ "astro/jsx-a11y/prefer-tag-over-role": "error",
44
+ "astro/jsx-a11y/role-has-required-aria-props": "error",
45
+ "astro/jsx-a11y/role-supports-aria-props": "error",
46
+ "astro/jsx-a11y/scope": "error",
47
+ "astro/jsx-a11y/tabindex-no-positive": "error",
48
+ "astro/missing-client-only-directive-value": "error",
49
+ "astro/no-conflict-set-directives": "error",
50
+ "astro/no-deprecated-astro-canonicalurl": "error",
51
+ "astro/no-deprecated-astro-fetchcontent": "error",
52
+ "astro/no-deprecated-astro-resolve": "error",
53
+ "astro/no-deprecated-getentrybyslug": "error",
54
+ "astro/no-exports-from-components": "error",
55
+ "astro/no-set-text-directive": "error",
56
+ "astro/no-unused-css-selector": "error",
57
+ "astro/no-unused-define-vars-in-style": "error",
58
+ "astro/prefer-class-list-directive": "error",
59
+ "astro/prefer-object-class-list": "error",
60
+ "astro/prefer-split-class-list": "error",
61
+ "astro/semi": "error",
62
+ "astro/valid-compile": "error",
63
+ },
64
64
  });
package/config.react.js CHANGED
@@ -5,83 +5,83 @@ import tseslint from "typescript-eslint";
5
5
  import {ignores, languageOptions} from "./eslint.config.js";
6
6
 
7
7
  export default tseslint.config({
8
- "files": ["**/*.{jsx,tsx}"],
9
- ignores,
10
- languageOptions,
11
- "plugins": {
12
- react,
13
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
14
- "react-hooks": reactHooks,
15
- },
16
- "rules": {
17
- "react-hooks/exhaustive-deps": "error",
18
- "react-hooks/rules-of-hooks": "error",
19
- "react/dom/no-children-in-void-dom-elements": "error",
20
- "react/dom/no-dangerously-set-innerhtml": "error",
21
- "react/dom/no-dangerously-set-innerhtml-with-children": "error",
22
- "react/dom/no-find-dom-node": "error",
23
- "react/dom/no-missing-button-type": "error",
24
- "react/dom/no-missing-iframe-sandbox": "error",
25
- "react/dom/no-namespace": "error",
26
- "react/dom/no-render-return-value": "error",
27
- "react/dom/no-script-url": "error",
28
- "react/dom/no-unsafe-iframe-sandbox": "error",
29
- "react/dom/no-unsafe-target-blank": "error",
30
- "react/ensure-forward-ref-using-ref": "error",
31
- "react/hooks-extra/ensure-custom-hooks-using-other-hooks": "error",
32
- "react/hooks-extra/ensure-use-callback-has-non-empty-deps": "error",
33
- "react/hooks-extra/ensure-use-memo-has-non-empty-deps": "error",
34
- "react/hooks-extra/no-direct-set-state-in-use-effect": "error",
35
- "react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
36
- "react/hooks-extra/prefer-use-state-lazy-initialization": "error",
37
- "react/naming-convention/component-name": "error",
38
- "react/naming-convention/filename": [
39
- "error",
40
- {"rule": "kebab-case"},
41
- ],
42
- "react/naming-convention/filename-extension": "error",
43
- "react/naming-convention/use-state": "error",
44
- "react/no-access-state-in-setstate": "error",
45
- "react/no-array-index-key": "error",
46
- "react/no-children-count": "error",
47
- "react/no-children-for-each": "error",
48
- "react/no-children-map": "error",
49
- "react/no-children-only": "error",
50
- "react/no-children-prop": "error",
51
- "react/no-children-to-array": "error",
52
- "react/no-class-component": "error",
53
- "react/no-clone-element": "error",
54
- "react/no-comment-textnodes": "error",
55
- "react/no-component-will-mount": "error",
56
- "react/no-component-will-receive-props": "error",
57
- "react/no-component-will-update": "error",
58
- "react/no-create-ref": "error",
59
- "react/no-default-props": "error",
60
- "react/no-direct-mutation-state": "error",
61
- "react/no-duplicate-key": "error",
62
- "react/no-implicit-key": "error",
63
- "react/no-leaked-conditional-rendering": "error",
64
- "react/no-missing-component-display-name": "error",
65
- "react/no-missing-key": "error",
66
- "react/no-nested-components": "error",
67
- "react/no-prop-types": "error",
68
- "react/no-redundant-should-component-update": "error",
69
- "react/no-set-state-in-component-did-mount": "error",
70
- "react/no-set-state-in-component-did-update": "error",
71
- "react/no-set-state-in-component-will-update": "error",
72
- "react/no-string-refs": "error",
73
- "react/no-unsafe-component-will-mount": "error",
74
- "react/no-unsafe-component-will-receive-props": "error",
75
- "react/no-unsafe-component-will-update": "error",
76
- "react/no-unstable-context-value": "error",
77
- "react/no-unstable-default-props": "error",
78
- "react/no-unused-class-component-members": "error",
79
- "react/no-unused-state": "error",
80
- "react/no-useless-fragment": "error",
81
- "react/prefer-destructuring-assignment": "error",
82
- "react/prefer-read-only-props": "error",
8
+ "files": ["**/*.{jsx,tsx}"],
9
+ ignores,
10
+ languageOptions,
11
+ "plugins": {
12
+ react,
13
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
14
+ "react-hooks": reactHooks,
15
+ },
16
+ "rules": {
17
+ "react-hooks/exhaustive-deps": "error",
18
+ "react-hooks/rules-of-hooks": "error",
19
+ "react/dom/no-children-in-void-dom-elements": "error",
20
+ "react/dom/no-dangerously-set-innerhtml": "error",
21
+ "react/dom/no-dangerously-set-innerhtml-with-children": "error",
22
+ "react/dom/no-find-dom-node": "error",
23
+ "react/dom/no-missing-button-type": "error",
24
+ "react/dom/no-missing-iframe-sandbox": "error",
25
+ "react/dom/no-namespace": "error",
26
+ "react/dom/no-render-return-value": "error",
27
+ "react/dom/no-script-url": "error",
28
+ "react/dom/no-unsafe-iframe-sandbox": "error",
29
+ "react/dom/no-unsafe-target-blank": "error",
30
+ "react/ensure-forward-ref-using-ref": "error",
31
+ "react/hooks-extra/ensure-custom-hooks-using-other-hooks": "error",
32
+ "react/hooks-extra/ensure-use-callback-has-non-empty-deps": "error",
33
+ "react/hooks-extra/ensure-use-memo-has-non-empty-deps": "error",
34
+ "react/hooks-extra/no-direct-set-state-in-use-effect": "error",
35
+ "react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
36
+ "react/hooks-extra/prefer-use-state-lazy-initialization": "error",
37
+ "react/naming-convention/component-name": "error",
38
+ "react/naming-convention/filename": [
39
+ "error",
40
+ {"rule": "kebab-case"},
41
+ ],
42
+ "react/naming-convention/filename-extension": "error",
43
+ "react/naming-convention/use-state": "error",
44
+ "react/no-access-state-in-setstate": "error",
45
+ "react/no-array-index-key": "error",
46
+ "react/no-children-count": "error",
47
+ "react/no-children-for-each": "error",
48
+ "react/no-children-map": "error",
49
+ "react/no-children-only": "error",
50
+ "react/no-children-prop": "error",
51
+ "react/no-children-to-array": "error",
52
+ "react/no-class-component": "error",
53
+ "react/no-clone-element": "error",
54
+ "react/no-comment-textnodes": "error",
55
+ "react/no-component-will-mount": "error",
56
+ "react/no-component-will-receive-props": "error",
57
+ "react/no-component-will-update": "error",
58
+ "react/no-create-ref": "error",
59
+ "react/no-default-props": "error",
60
+ "react/no-direct-mutation-state": "error",
61
+ "react/no-duplicate-key": "error",
62
+ "react/no-implicit-key": "error",
63
+ "react/no-leaked-conditional-rendering": "error",
64
+ "react/no-missing-component-display-name": "error",
65
+ "react/no-missing-key": "error",
66
+ "react/no-nested-components": "error",
67
+ "react/no-prop-types": "error",
68
+ "react/no-redundant-should-component-update": "error",
69
+ "react/no-set-state-in-component-did-mount": "error",
70
+ "react/no-set-state-in-component-did-update": "error",
71
+ "react/no-set-state-in-component-will-update": "error",
72
+ "react/no-string-refs": "error",
73
+ "react/no-unsafe-component-will-mount": "error",
74
+ "react/no-unsafe-component-will-receive-props": "error",
75
+ "react/no-unsafe-component-will-update": "error",
76
+ "react/no-unstable-context-value": "error",
77
+ "react/no-unstable-default-props": "error",
78
+ "react/no-unused-class-component-members": "error",
79
+ "react/no-unused-state": "error",
80
+ "react/no-useless-fragment": "error",
81
+ "react/prefer-destructuring-assignment": "error",
82
+ "react/prefer-read-only-props": "error",
83
83
 
84
- "react/prefer-shorthand-boolean": "error",
85
- "react/prefer-shorthand-fragment": "error",
86
- },
84
+ "react/prefer-shorthand-boolean": "error",
85
+ "react/prefer-shorthand-fragment": "error",
86
+ },
87
87
  });
package/config.solid.js CHANGED
@@ -4,29 +4,29 @@ import tseslint from "typescript-eslint";
4
4
  import {ignores, languageOptions} from "./eslint.config.js";
5
5
 
6
6
  export default tseslint.config({
7
- "files": ["**/*.{jsx,tsx}"],
8
- ignores,
9
- languageOptions,
10
- "plugins": {solid},
11
- "rules": {
12
- "solid/components-return-once": "error",
13
- "solid/event-handlers": "error",
14
- "solid/imports": "error",
15
- "solid/jsx-no-duplicate-props": "error",
16
- "solid/jsx-no-script-url": "error",
17
- "solid/jsx-no-undef": "error",
18
- "solid/jsx-uses-vars": "error",
19
- "solid/no-array-handlers": "error",
20
- "solid/no-destructure": "error",
21
- "solid/no-innerhtml": "error",
22
- "solid/no-proxy-apis": "error",
23
- "solid/no-react-deps": "error",
24
- "solid/no-react-specific-props": "error",
25
- "solid/no-unknown-namespaces": "error",
26
- "solid/prefer-for": "error",
27
- "solid/prefer-show": "error",
28
- "solid/reactivity": "error",
29
- "solid/self-closing-comp": "error",
30
- "solid/style-prop": "error",
31
- },
7
+ "files": ["**/*.{jsx,tsx}"],
8
+ ignores,
9
+ languageOptions,
10
+ "plugins": {solid},
11
+ "rules": {
12
+ "solid/components-return-once": "error",
13
+ "solid/event-handlers": "error",
14
+ "solid/imports": "error",
15
+ "solid/jsx-no-duplicate-props": "error",
16
+ "solid/jsx-no-script-url": "error",
17
+ "solid/jsx-no-undef": "error",
18
+ "solid/jsx-uses-vars": "error",
19
+ "solid/no-array-handlers": "error",
20
+ "solid/no-destructure": "error",
21
+ "solid/no-innerhtml": "error",
22
+ "solid/no-proxy-apis": "error",
23
+ "solid/no-react-deps": "error",
24
+ "solid/no-react-specific-props": "error",
25
+ "solid/no-unknown-namespaces": "error",
26
+ "solid/prefer-for": "error",
27
+ "solid/prefer-show": "error",
28
+ "solid/reactivity": "error",
29
+ "solid/self-closing-comp": "error",
30
+ "solid/style-prop": "error",
31
+ },
32
32
  });
package/eslint.config.js CHANGED
@@ -558,7 +558,7 @@ export default tseslint.config({
558
558
  "stylistic/function-paren-newline": "error",
559
559
  "stylistic/generator-star-spacing": "error",
560
560
  "stylistic/implicit-arrow-linebreak": "error",
561
- "stylistic/indent": "error",
561
+ "stylistic/indent": ["error", 2],
562
562
  "stylistic/jsx-quotes": "error",
563
563
  "stylistic/key-spacing": "error",
564
564
  "stylistic/keyword-spacing": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethang/eslint-config",
3
- "version": "18.4.0",
3
+ "version": "18.4.2",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/eglove/eslint-config-ethang.git"
6
6
  },
@@ -18,6 +18,7 @@
18
18
  "peerDependencies": {
19
19
  "@eslint-react/eslint-plugin": "^1.9.0",
20
20
  "@eslint/js": "^9.8.0",
21
+ "@stylistic/eslint-plugin": "^2.6.1",
21
22
  "@tanstack/eslint-plugin-query": "^5.51.15",
22
23
  "@typescript-eslint/parser": "^8.0.1",
23
24
  "eslint": "^9.8.0",
@@ -40,6 +41,7 @@
40
41
  "dependencies": {
41
42
  "@eslint-react/eslint-plugin": "^1.9.0",
42
43
  "@eslint/js": "^9.8.0",
44
+ "@stylistic/eslint-plugin": "^2.6.1",
43
45
  "@tanstack/eslint-plugin-query": "^5.51.15",
44
46
  "@typescript-eslint/parser": "^8.0.1",
45
47
  "eslint": "^9.8.0",
@@ -61,7 +63,6 @@
61
63
  },
62
64
  "devDependencies": {
63
65
  "@ethang/project-builder": "^1.2.2",
64
- "@stylistic/eslint-plugin": "^2.6.1",
65
66
  "@tsconfig/node-lts": "^20.1.3",
66
67
  "@tsconfig/strictest": "^2.0.5"
67
68
  }