eslint-config-seekingalpha-react 10.25.0 → 10.27.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 10.27.0 - 2026-01-27
4
+
5
+ - [new] add sharable oxlint config with eslint-plugin-jsx-a11y and eslint-plugin-react-hooks rules
6
+
7
+ ## 10.26.0 - 2026-01-27
8
+
9
+ - [new] add sharable oxlint config with eslint-plugin-react rules
10
+
3
11
  ## 10.25.0 - 2025-12-13
4
12
 
5
13
  - [deps] upgrade `eslint` to version `9.39.2`
package/oxc.js ADDED
@@ -0,0 +1,17 @@
1
+ import { ESLintPluginReactDisabled } from './rules/eslint-plugin-react/oxlint-disabled.js';
2
+ import { ESLintPluginA11YDisabled } from './rules/eslint-plugin-jsx-a11y/oxlint-disabled.js';
3
+ import { ESLintPluginReactHooksDisabled } from './rules/eslint-plugin-react-hooks/oxlint-disabled.js';
4
+
5
+ import config from './index.js';
6
+
7
+ const oxcConfig = {
8
+ ...config,
9
+ rules: {
10
+ ...config.rules,
11
+ ...ESLintPluginReactDisabled,
12
+ ...ESLintPluginA11YDisabled,
13
+ ...ESLintPluginReactHooksDisabled,
14
+ },
15
+ };
16
+
17
+ export default oxcConfig;
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "extends": [
4
+ "./rules/eslint-plugin-react/oxlint-config.json",
5
+ "./rules/eslint-plugin-a11y/oxlint-config.json",
6
+ "./rules/eslint-plugin-react-hooks/oxlint-config.json"
7
+ ]
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-seekingalpha-react",
3
- "version": "10.25.0",
3
+ "version": "10.27.0",
4
4
  "description": "SeekingAlpha's sharable React.js ESLint config",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,6 +17,8 @@ export default {
17
17
  },
18
18
  ],
19
19
 
20
+ 'anchor-ambiguous-text': 'off',
21
+
20
22
  // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md
21
23
  'jsx-a11y/anchor-has-content': [
22
24
  'error',
@@ -268,5 +270,7 @@ export default {
268
270
  'jsx-a11y/control-has-associated-label': 'error',
269
271
 
270
272
  'jsx-a11y/prefer-tag-over-role': 'error',
273
+
274
+ 'jsx-a11y/no-aria-hidden-on-focusable': 'off',
271
275
  },
272
276
  };
@@ -0,0 +1,116 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["jsx-a11y"],
4
+ "rules": {
5
+ "jsx-a11y/alt-text": [
6
+ "error",
7
+ {
8
+ "elements": ["img", "object", "area", "input[type='image']"],
9
+ "img": [],
10
+ "object": [],
11
+ "area": [],
12
+ "input[type='image']": []
13
+ }
14
+ ],
15
+ "anchor-ambiguous-text": "off",
16
+ "jsx-a11y/anchor-has-content": [
17
+ "error",
18
+ {
19
+ "components": ["Anchor", "Link"]
20
+ }
21
+ ],
22
+ "jsx-a11y/anchor-is-valid": [
23
+ "error",
24
+ {
25
+ "components": ["Anchor", "Link"],
26
+ "specialLink": ["to"],
27
+ "aspects": ["noHref", "invalidHref", "preferButton"]
28
+ }
29
+ ],
30
+ "jsx-a11y/aria-activedescendant-has-tabindex": "error",
31
+ "jsx-a11y/aria-props": "error",
32
+ "jsx-a11y/aria-proptypes": "error",
33
+ "jsx-a11y/aria-role": [
34
+ "error",
35
+ {
36
+ "ignoreNonDom": false
37
+ }
38
+ ],
39
+ "jsx-a11y/aria-unsupported-elements": "error",
40
+ "jsx-a11y/autocomplete-valid": "error",
41
+ "jsx-a11y/click-events-have-key-events": "error",
42
+ "jsx-a11y/heading-has-content": [
43
+ "error",
44
+ {
45
+ "components": [""]
46
+ }
47
+ ],
48
+ "jsx-a11y/html-has-lang": "error",
49
+ "jsx-a11y/iframe-has-title": "error",
50
+ "jsx-a11y/img-redundant-alt": "error",
51
+ "jsx-a11y/lang": "error",
52
+ "jsx-a11y/media-has-caption": [
53
+ "error",
54
+ {
55
+ "audio": [],
56
+ "video": [],
57
+ "track": []
58
+ }
59
+ ],
60
+ "jsx-a11y/mouse-events-have-key-events": "error",
61
+ "jsx-a11y/no-access-key": "error",
62
+ "jsx-a11y/no-aria-hidden-on-focusable": "off",
63
+ "jsx-a11y/no-autofocus": [
64
+ "error",
65
+ {
66
+ "ignoreNonDOM": true
67
+ }
68
+ ],
69
+ "jsx-a11y/no-distracting-elements": [
70
+ "error",
71
+ {
72
+ "elements": ["marquee", "blink"]
73
+ }
74
+ ],
75
+ "jsx-a11y/no-noninteractive-tabindex": [
76
+ "error",
77
+ {
78
+ "tags": [],
79
+ "roles": ["tabpanel"]
80
+ }
81
+ ],
82
+ "jsx-a11y/no-redundant-roles": [
83
+ "error",
84
+ {
85
+ "nav": ["navigation"]
86
+ }
87
+ ],
88
+ "jsx-a11y/no-static-element-interactions": [
89
+ "error",
90
+ {
91
+ "handlers": [
92
+ "onClick",
93
+ "onMouseDown",
94
+ "onKeyPress",
95
+ "onKeyDown",
96
+ "onKeyUp"
97
+ ]
98
+ }
99
+ ],
100
+ "jsx-a11y/role-has-required-aria-props": "error",
101
+ "jsx-a11y/role-supports-aria-props": "error",
102
+ "jsx-a11y/scope": "error",
103
+ "jsx-a11y/tabindex-no-positive": "error",
104
+ "jsx-a11y/label-has-associated-control": [
105
+ "error",
106
+ {
107
+ "labelComponents": [],
108
+ "labelAttributes": [],
109
+ "controlComponents": [],
110
+ "assert": "both",
111
+ "depth": 10
112
+ }
113
+ ],
114
+ "jsx-a11y/prefer-tag-over-role": "error"
115
+ }
116
+ }
@@ -0,0 +1,33 @@
1
+ export const ESLintPluginA11YDisabled = {
2
+ 'jsx-a11y/alt-text': 'off',
3
+ 'anchor-ambiguous-text': 'off',
4
+ 'jsx-a11y/anchor-has-content': 'off',
5
+ 'jsx-a11y/anchor-is-valid': 'off',
6
+ 'jsx-a11y/aria-activedescendant-has-tabindex': 'off',
7
+ 'jsx-a11y/aria-props': 'off',
8
+ 'jsx-a11y/aria-proptypes': 'off',
9
+ 'jsx-a11y/aria-role': 'off',
10
+ 'jsx-a11y/aria-unsupported-elements': 'off',
11
+ 'jsx-a11y/autocomplete-valid': 'off',
12
+ 'jsx-a11y/click-events-have-key-events': 'off',
13
+ 'jsx-a11y/heading-has-content': 'off',
14
+ 'jsx-a11y/html-has-lang': 'off',
15
+ 'jsx-a11y/iframe-has-title': 'off',
16
+ 'jsx-a11y/img-redundant-alt': 'off',
17
+ 'jsx-a11y/lang': 'off',
18
+ 'jsx-a11y/media-has-caption': 'off',
19
+ 'jsx-a11y/mouse-events-have-key-events': 'off',
20
+ 'jsx-a11y/no-access-key': 'off',
21
+ 'jsx-a11y/no-aria-hidden-on-focusable': 'off',
22
+ 'jsx-a11y/no-autofocus': 'off',
23
+ 'jsx-a11y/no-distracting-elements': 'off',
24
+ 'jsx-a11y/no-noninteractive-tabindex': 'off',
25
+ 'jsx-a11y/no-redundant-roles': 'off',
26
+ 'jsx-a11y/no-static-element-interactions': 'off',
27
+ 'jsx-a11y/role-has-required-aria-props': 'off',
28
+ 'jsx-a11y/role-supports-aria-props': 'off',
29
+ 'jsx-a11y/scope': 'off',
30
+ 'jsx-a11y/tabindex-no-positive': 'off',
31
+ 'jsx-a11y/label-has-associated-control': 'off',
32
+ 'jsx-a11y/prefer-tag-over-role': 'off',
33
+ };
@@ -0,0 +1,165 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["react"],
4
+ "rules": {
5
+ "react/jsx-boolean-value": [
6
+ "error",
7
+ "never",
8
+ {
9
+ "always": []
10
+ }
11
+ ],
12
+ "react/jsx-filename-extension": [
13
+ "error",
14
+ {
15
+ "extensions": [".tsx"]
16
+ }
17
+ ],
18
+ "react/jsx-fragments": ["error", "syntax"],
19
+ "react/jsx-handler-names": "off",
20
+ "react/jsx-key": [
21
+ "error",
22
+ {
23
+ "checkFragmentShorthand": true,
24
+ "checkKeyMustBeforeSpread": true,
25
+ "warnOnDuplicates": true
26
+ }
27
+ ],
28
+ "react/jsx-max-depth": [
29
+ "error",
30
+ {
31
+ "max": 10
32
+ }
33
+ ],
34
+ "react/jsx-no-comment-textnodes": "error",
35
+ "react/jsx-no-duplicate-props": [
36
+ "error",
37
+ {
38
+ "ignoreCase": true
39
+ }
40
+ ],
41
+ "react/jsx-props-no-spread-multi": "error",
42
+ "react/jsx-no-target-blank": [
43
+ "error",
44
+ {
45
+ "enforceDynamicLinks": "always"
46
+ }
47
+ ],
48
+ "react/jsx-no-undef": "error",
49
+ "react/jsx-curly-brace-presence": [
50
+ "error",
51
+ {
52
+ "props": "never",
53
+ "children": "never"
54
+ }
55
+ ],
56
+ "react/jsx-pascal-case": [
57
+ "error",
58
+ {
59
+ "allowAllCaps": false,
60
+ "ignore": []
61
+ }
62
+ ],
63
+ "react/no-danger": "error",
64
+ "react/jsx-props-no-spreading": "off",
65
+ "react/jsx-no-useless-fragment": [
66
+ "error",
67
+ {
68
+ "allowExpressions": true
69
+ }
70
+ ],
71
+ "react/jsx-no-script-url": "error",
72
+ "react/button-has-type": [
73
+ "error",
74
+ {
75
+ "button": true,
76
+ "submit": true,
77
+ "reset": true
78
+ }
79
+ ],
80
+ "react/checked-requires-onchange-or-readonly": "error",
81
+ "react/display-name": "off",
82
+ "react/forbid-dom-props": [
83
+ "error",
84
+ {
85
+ "forbid": [
86
+ "abbr",
87
+ "align",
88
+ "axis",
89
+ "bgcolor",
90
+ "border",
91
+ "cellpadding",
92
+ "cellspacing",
93
+ "char",
94
+ "charoff",
95
+ "charset",
96
+ "clear",
97
+ "coords",
98
+ "frame",
99
+ "frameborder",
100
+ "hspace",
101
+ "longdesc",
102
+ "marginheight",
103
+ "marginwidth",
104
+ "rev",
105
+ "scope",
106
+ "scrolling",
107
+ "shape",
108
+ "size",
109
+ "valign",
110
+ "vspace"
111
+ ]
112
+ }
113
+ ],
114
+ "react/forbid-elements": [
115
+ "error",
116
+ {
117
+ "forbid": [
118
+ "acronym",
119
+ "applet",
120
+ "basefont",
121
+ "big",
122
+ "center",
123
+ "dir",
124
+ "font",
125
+ "frame",
126
+ "frameset",
127
+ "noframes",
128
+ "isindex",
129
+ "noframes",
130
+ "s",
131
+ "strike",
132
+ "tt",
133
+ "u"
134
+ ]
135
+ }
136
+ ],
137
+ "react/forward-ref-uses-ref": "error",
138
+ "react/iframe-missing-sandbox": "error",
139
+ "react/no-array-index-key": "error",
140
+ "react/no-children-prop": "error",
141
+ "react/no-danger-with-children": "error",
142
+ "react/no-did-mount-set-state": "off",
143
+ "react/no-direct-mutation-state": "error",
144
+ "react/no-find-dom-node": "error",
145
+ "react/no-is-mounted": "error",
146
+ "react/no-namespace": "error",
147
+ "react/no-redundant-should-component-update": "error",
148
+ "react/no-render-return-value": "error",
149
+ "react/no-set-state": "off",
150
+ "react/only-export-components": "off",
151
+ "react/no-string-refs": "error",
152
+ "react/no-this-in-sfc": "error",
153
+ "react/no-unescaped-entities": "error",
154
+ "react/no-unknown-property": "error",
155
+ "react/no-unsafe": "error",
156
+ "react/no-will-update-set-state": "error",
157
+ "react/prefer-es6-class": ["error", "always"],
158
+ "react/react-in-jsx-scope": "off",
159
+ "require-render-return": "error",
160
+ "react/self-closing-comp": "error",
161
+ "react/style-prop-object": "error",
162
+ "react/void-dom-elements-no-children": "error",
163
+ "react/state-in-constructor": ["error", "always"]
164
+ }
165
+ }
@@ -0,0 +1,50 @@
1
+ export const ESLintPluginReactDisabled = {
2
+ 'react/jsx-boolean-value': 'off',
3
+ 'react/jsx-filename-extension': 'off',
4
+ 'react/jsx-fragments': 'off',
5
+ 'react/jsx-handler-names': 'off',
6
+ 'react/jsx-key': 'off',
7
+ 'react/jsx-max-depth': 'off',
8
+ 'react/jsx-no-comment-textnodes': 'off',
9
+ 'react/jsx-no-duplicate-props': 'off',
10
+ 'react/jsx-props-no-spread-multi': 'off',
11
+ 'react/jsx-no-target-blank': 'off',
12
+ 'react/jsx-no-undef': 'off',
13
+ 'react/jsx-curly-brace-presence': 'off',
14
+ 'react/jsx-pascal-case': 'off',
15
+ 'react/no-danger': 'off',
16
+ 'react/jsx-props-no-spreading': 'off',
17
+ 'react/jsx-no-useless-fragment': 'off',
18
+ 'react/jsx-no-script-url': 'off',
19
+ 'react/button-has-type': 'off',
20
+ 'react/checked-requires-onchange-or-readonly': 'off',
21
+ 'react/display-name': 'off',
22
+ 'react/forbid-dom-props': 'off',
23
+ 'react/forbid-elements': 'off',
24
+ 'react/forward-ref-uses-ref': 'off',
25
+ 'react/iframe-missing-sandbox': 'off',
26
+ 'react/no-array-index-key': 'off',
27
+ 'react/no-children-prop': 'off',
28
+ 'react/no-danger-with-children': 'off',
29
+ 'react/no-did-mount-set-state': 'off',
30
+ 'react/no-direct-mutation-state': 'off',
31
+ 'react/no-find-dom-node': 'off',
32
+ 'react/no-is-mounted': 'off',
33
+ 'react/no-namespace': 'off',
34
+ 'react/no-redundant-should-component-update': 'off',
35
+ 'react/no-render-return-value': 'off',
36
+ 'react/no-set-state': 'off',
37
+ 'react/no-string-refs': 'off',
38
+ 'react/no-this-in-sfc': 'off',
39
+ 'react/no-unescaped-entities': 'off',
40
+ 'react/no-unknown-property': 'off',
41
+ 'react/no-unsafe': 'off',
42
+ 'react/no-will-update-set-state': 'off',
43
+ 'react/prefer-es6-class': 'off',
44
+ 'react/react-in-jsx-scope': 'off',
45
+ 'require-render-return': 'off',
46
+ 'react/self-closing-comp': 'off',
47
+ 'react/style-prop-object': 'off',
48
+ 'react/void-dom-elements-no-children': 'off',
49
+ 'react/state-in-constructor': 'off',
50
+ };
@@ -35,12 +35,7 @@ export default {
35
35
  'react/destructuring-assignment': ['error', 'always'],
36
36
 
37
37
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
38
- 'react/display-name': [
39
- 'off',
40
- {
41
- ignoreTranspilerName: false,
42
- },
43
- ],
38
+ 'react/display-name': 'off',
44
39
 
45
40
  /*
46
41
  * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["react"],
4
+ "rules": {
5
+ "react-hooks/rules-of-hooks": "error",
6
+ "react-hooks/exhaustive-deps": "error"
7
+ }
8
+ }
@@ -0,0 +1,4 @@
1
+ export const ESLintPluginReactHooksDisabled = {
2
+ 'react-hooks/rules-of-hooks': 'off',
3
+ 'react-hooks/exhaustive-deps': 'off',
4
+ };