eslint-config-seekingalpha-react 10.25.0 → 10.26.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
package/oxc.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ESLintPluginReactDisabled } from './rules/eslint-plugin-react/oxlint-disabled.js';
|
|
2
|
+
|
|
3
|
+
import config from './index.js';
|
|
4
|
+
|
|
5
|
+
const oxcConfig = {
|
|
6
|
+
...config,
|
|
7
|
+
rules: {
|
|
8
|
+
...config.rules,
|
|
9
|
+
...ESLintPluginReactDisabled,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default oxcConfig;
|
package/package.json
CHANGED
|
@@ -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
|