@storm-software/eslint 0.107.2 → 0.108.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/README.md +1 -1
- package/dist/chunk-723HQUNP.js +14 -0
- package/dist/{chunk-V7TQDECV.js → chunk-E7T4SNH3.js} +2 -4
- package/dist/chunk-ESFBJFNU.cjs +149 -0
- package/dist/chunk-FTXILLLE.js +24 -0
- package/dist/chunk-JS7W7LMD.cjs +14 -0
- package/dist/chunk-KND2ZTLT.cjs +49 -0
- package/dist/chunk-LSG5T3ZK.js +313 -0
- package/dist/{chunk-CIGM5K4I.cjs → chunk-NFPQICLG.cjs} +2 -4
- package/dist/chunk-OGGLIE6C.cjs +24 -0
- package/dist/chunk-QDLKHXPX.cjs +11 -0
- package/dist/chunk-RTM5LCEB.js +149 -0
- package/dist/chunk-SHUYVCID.js +6 -0
- package/dist/chunk-TXTXUVRZ.cjs +313 -0
- package/dist/chunk-VJ6CKC4P.js +37 -0
- package/dist/chunk-Y67QTC5U.js +49 -0
- package/dist/chunk-YQQ366F7.cjs +37 -0
- package/dist/preset.cjs +169 -20187
- package/dist/preset.js +88 -20104
- package/dist/rules/import.cjs +292 -0
- package/dist/rules/import.d.cts +5 -0
- package/dist/rules/import.d.ts +5 -0
- package/dist/rules/import.js +292 -0
- package/dist/rules/jsx-a11y.cjs +341 -0
- package/dist/rules/jsx-a11y.d.cts +5 -0
- package/dist/rules/jsx-a11y.d.ts +5 -0
- package/dist/rules/jsx-a11y.js +341 -0
- package/dist/rules/react-hooks.cjs +15 -0
- package/dist/rules/react-hooks.d.cts +5 -0
- package/dist/rules/react-hooks.d.ts +5 -0
- package/dist/rules/react-hooks.js +15 -0
- package/dist/rules/react.cjs +689 -0
- package/dist/rules/react.d.cts +5 -0
- package/dist/rules/react.d.ts +5 -0
- package/dist/rules/react.js +689 -0
- package/dist/rules/storm.cjs +3 -3
- package/dist/rules/storm.js +2 -2
- package/dist/rules/ts-docs.cjs +7 -0
- package/dist/rules/ts-docs.d.cts +5 -0
- package/dist/rules/ts-docs.d.ts +5 -0
- package/dist/rules/ts-docs.js +7 -0
- package/dist/utils/banner-plugin.cjs +9 -0
- package/dist/utils/banner-plugin.d.cts +6 -0
- package/dist/utils/banner-plugin.d.ts +6 -0
- package/dist/utils/banner-plugin.js +9 -0
- package/dist/utils/constants.cjs +25 -0
- package/dist/utils/constants.d.cts +24 -0
- package/dist/utils/constants.d.ts +24 -0
- package/dist/utils/constants.js +25 -0
- package/dist/utils/create-flat-import-plugin.cjs +20 -0
- package/dist/utils/create-flat-import-plugin.d.cts +11 -0
- package/dist/utils/create-flat-import-plugin.d.ts +11 -0
- package/dist/utils/create-flat-import-plugin.js +20 -0
- package/dist/utils/format-config.cjs +7 -0
- package/dist/utils/format-config.d.cts +5 -0
- package/dist/utils/format-config.d.ts +5 -0
- package/dist/utils/format-config.js +7 -0
- package/dist/utils/get-file-banner.cjs +8 -0
- package/dist/utils/get-file-banner.d.cts +9 -0
- package/dist/utils/get-file-banner.d.ts +9 -0
- package/dist/utils/get-file-banner.js +8 -0
- package/dist/utils/ignores.cjs +7 -0
- package/dist/utils/ignores.d.cts +3 -0
- package/dist/utils/ignores.d.ts +3 -0
- package/dist/utils/ignores.js +7 -0
- package/dist/utils/index.cjs +33 -0
- package/dist/utils/index.d.cts +4 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +33 -0
- package/package.json +1 -1
- package/dist/acorn-CCDA5Y7C.cjs +0 -3131
- package/dist/acorn-PTPZSZS6.js +0 -3131
- package/dist/angular-NDZ53HZT.js +0 -3014
- package/dist/angular-XXKPBORI.cjs +0 -3014
- package/dist/babel-7OKY5N6D.js +0 -7166
- package/dist/babel-ZAEH2MD6.cjs +0 -7166
- package/dist/chunk-2GN5RLNR.js +0 -55
- package/dist/chunk-BHJDUHOW.cjs +0 -84
- package/dist/chunk-GSOR5H2M.cjs +0 -4022
- package/dist/chunk-HXTIVITI.js +0 -4022
- package/dist/chunk-KOFZWJCN.js +0 -84
- package/dist/chunk-PWYAFNCE.cjs +0 -59
- package/dist/dist-3EJMVSVL.js +0 -15716
- package/dist/dist-GB3FBWYD.cjs +0 -15717
- package/dist/esm-HMD4VZC2.js +0 -1715
- package/dist/esm-KLBQYHBS.cjs +0 -1715
- package/dist/estree-4FZVBA3I.js +0 -4859
- package/dist/estree-TXEM7J44.cjs +0 -4859
- package/dist/execa-6ZJHRRGH.js +0 -2424
- package/dist/execa-RWXGY3AF.cjs +0 -2424
- package/dist/flow-LEJXBIDN.cjs +0 -28076
- package/dist/flow-TYUDSDMT.js +0 -28076
- package/dist/glimmer-BFX2N2PO.js +0 -3062
- package/dist/glimmer-CI4NLBJN.cjs +0 -3062
- package/dist/graphql-ATKH2UJU.js +0 -1355
- package/dist/graphql-F26LLKM2.cjs +0 -1355
- package/dist/html-DPSCSLFD.cjs +0 -3036
- package/dist/html-TQZJETBK.js +0 -3036
- package/dist/json5-2N47OU6X.cjs +0 -764
- package/dist/json5-DGCDZGKI.js +0 -764
- package/dist/jsonc-3RGXS4EK.js +0 -447
- package/dist/jsonc-H5JHBJWX.cjs +0 -447
- package/dist/markdown-ENFWQVL3.js +0 -3846
- package/dist/markdown-KDQOGP3N.cjs +0 -3846
- package/dist/meriyah-UO5W2QS6.js +0 -2720
- package/dist/meriyah-XW3PRYEN.cjs +0 -2720
- package/dist/multipart-parser-POHWNSZ2.cjs +0 -186
- package/dist/multipart-parser-ZBOXYK27.js +0 -186
- package/dist/postcss-ICZTIVVB.js +0 -5440
- package/dist/postcss-OH45GBM4.cjs +0 -5440
- package/dist/prettier-U5XWBEA6.js +0 -23559
- package/dist/prettier-UYPX4PW2.cjs +0 -23560
- package/dist/toml-NUWFIHJI.js +0 -509
- package/dist/toml-WFSEGMHQ.cjs +0 -509
- package/dist/typescript-6RS3BOJH.js +0 -14956
- package/dist/typescript-K6YYG6NX.cjs +0 -14956
- package/dist/yaml-DOGTEZV3.js +0 -4584
- package/dist/yaml-GNGUKHFM.cjs +0 -4584
- package/dist/yaml-UATHGD5B.cjs +0 -1119
- package/dist/yaml-XTDKP6DN.js +0 -1119
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-QDLKHXPX.cjs');
|
|
2
|
+
|
|
3
|
+
// src/rules/react.ts
|
|
4
|
+
var config = {
|
|
5
|
+
// We recommend using TypeScript over `prop-types`, as `prop-types` can add
|
|
6
|
+
// to a project's build size.
|
|
7
|
+
"react/prop-types": "off",
|
|
8
|
+
// Disable requiring React to be imported, as this is no longer required.
|
|
9
|
+
"react/react-in-jsx-scope": "off",
|
|
10
|
+
/**
|
|
11
|
+
* Require an explicit type when using button elements.
|
|
12
|
+
*
|
|
13
|
+
* 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
|
|
14
|
+
*/
|
|
15
|
+
"react/button-has-type": [
|
|
16
|
+
"error",
|
|
17
|
+
{
|
|
18
|
+
button: true,
|
|
19
|
+
submit: true,
|
|
20
|
+
reset: true
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
/**
|
|
24
|
+
* Require consistent function type for function components.
|
|
25
|
+
*
|
|
26
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/docs/rules/function-component-definition.md
|
|
27
|
+
*/
|
|
28
|
+
"react/function-component-definition": "warn",
|
|
29
|
+
/**
|
|
30
|
+
* Require destructuring and symmetric naming of `useState` hook value and setter variables.
|
|
31
|
+
*
|
|
32
|
+
* 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md
|
|
33
|
+
*/
|
|
34
|
+
"react/hook-use-state": "warn",
|
|
35
|
+
/**
|
|
36
|
+
* Require consistent boolean attributes notation in JSX.
|
|
37
|
+
*
|
|
38
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
|
|
39
|
+
*/
|
|
40
|
+
"react/jsx-boolean-value": "warn",
|
|
41
|
+
/**
|
|
42
|
+
* Disallow unnecessary curly braces in JSX props and children.
|
|
43
|
+
*
|
|
44
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
|
|
45
|
+
*/
|
|
46
|
+
"react/jsx-curly-brace-presence": "warn",
|
|
47
|
+
/**
|
|
48
|
+
* Require using shorthand form for React fragments, unless required.
|
|
49
|
+
*
|
|
50
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
|
|
51
|
+
*/
|
|
52
|
+
"react/jsx-fragments": [
|
|
53
|
+
"error",
|
|
54
|
+
"syntax"
|
|
55
|
+
],
|
|
56
|
+
/**
|
|
57
|
+
* Prevent problematic leaked values from being rendered.
|
|
58
|
+
*
|
|
59
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
|
|
60
|
+
*/
|
|
61
|
+
"react/jsx-no-leaked-render": "warn",
|
|
62
|
+
/**
|
|
63
|
+
* Prevents usage of unsafe `target='_blank'`.
|
|
64
|
+
*
|
|
65
|
+
* This rule is a part of `react/recommended`, but we've modified it to
|
|
66
|
+
* allow referrer.
|
|
67
|
+
*
|
|
68
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
|
|
69
|
+
*/
|
|
70
|
+
"react/jsx-no-target-blank": [
|
|
71
|
+
"error",
|
|
72
|
+
{
|
|
73
|
+
enforceDynamicLinks: "always",
|
|
74
|
+
allowReferrer: true
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
/**
|
|
78
|
+
* Disallow empty React fragments.
|
|
79
|
+
*
|
|
80
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
|
|
81
|
+
*/
|
|
82
|
+
"react/jsx-no-useless-fragment": [
|
|
83
|
+
"warn",
|
|
84
|
+
{
|
|
85
|
+
allowExpressions: true
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
/**
|
|
89
|
+
* Require the use of PascalCase for user-defined JSX components.
|
|
90
|
+
*
|
|
91
|
+
* 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
|
|
92
|
+
*/
|
|
93
|
+
"react/jsx-pascal-case": [
|
|
94
|
+
"error",
|
|
95
|
+
{
|
|
96
|
+
allowAllCaps: true,
|
|
97
|
+
ignore: []
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
/**
|
|
101
|
+
* Disallow usage of Array index in keys.
|
|
102
|
+
*
|
|
103
|
+
* 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
|
|
104
|
+
*/
|
|
105
|
+
"react/no-array-index-key": "warn",
|
|
106
|
+
/**
|
|
107
|
+
* Disallow creating unstable components inside components.
|
|
108
|
+
*
|
|
109
|
+
* 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
|
|
110
|
+
*/
|
|
111
|
+
"react/no-unstable-nested-components": "error",
|
|
112
|
+
/**
|
|
113
|
+
* Disallow closing tags for components without children.
|
|
114
|
+
*
|
|
115
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
|
|
116
|
+
*/
|
|
117
|
+
"react/self-closing-comp": "warn",
|
|
118
|
+
// Specify whether double or single quotes should be used in JSX attributes
|
|
119
|
+
// https://eslint.org/docs/rules/jsx-quotes
|
|
120
|
+
"jsx-quotes": [
|
|
121
|
+
"error",
|
|
122
|
+
"prefer-double"
|
|
123
|
+
],
|
|
124
|
+
"class-methods-use-this": [
|
|
125
|
+
"error",
|
|
126
|
+
{
|
|
127
|
+
exceptMethods: [
|
|
128
|
+
"render",
|
|
129
|
+
"getInitialState",
|
|
130
|
+
"getDefaultProps",
|
|
131
|
+
"getChildContext",
|
|
132
|
+
"componentWillMount",
|
|
133
|
+
"UNSAFE_componentWillMount",
|
|
134
|
+
"componentDidMount",
|
|
135
|
+
"componentWillReceiveProps",
|
|
136
|
+
"UNSAFE_componentWillReceiveProps",
|
|
137
|
+
"shouldComponentUpdate",
|
|
138
|
+
"componentWillUpdate",
|
|
139
|
+
"UNSAFE_componentWillUpdate",
|
|
140
|
+
"componentDidUpdate",
|
|
141
|
+
"componentWillUnmount",
|
|
142
|
+
"componentDidCatch",
|
|
143
|
+
"getSnapshotBeforeUpdate"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
// This rule enforces onChange or readonly attribute for checked property of input elements.
|
|
148
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
|
|
149
|
+
"react/checked-requires-onchange-or-readonly": [
|
|
150
|
+
"off",
|
|
151
|
+
{
|
|
152
|
+
ignoreMissingProperties: false,
|
|
153
|
+
ignoreExclusiveCheckedAttribute: false
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
// Prevent missing displayName in a React component definition
|
|
157
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
|
|
158
|
+
"react/display-name": [
|
|
159
|
+
"off",
|
|
160
|
+
{
|
|
161
|
+
ignoreTranspilerName: false
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
// Forbid certain propTypes (any, array, object)
|
|
165
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md
|
|
166
|
+
"react/forbid-prop-types": [
|
|
167
|
+
"error",
|
|
168
|
+
{
|
|
169
|
+
forbid: [
|
|
170
|
+
"any",
|
|
171
|
+
"array",
|
|
172
|
+
"object"
|
|
173
|
+
],
|
|
174
|
+
checkContextTypes: true,
|
|
175
|
+
checkChildContextTypes: true
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
// Forbid certain props on DOM Nodes
|
|
179
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md
|
|
180
|
+
"react/forbid-dom-props": [
|
|
181
|
+
"off",
|
|
182
|
+
{
|
|
183
|
+
forbid: []
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
// Validate closing bracket location in JSX
|
|
187
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
|
|
188
|
+
"react/jsx-closing-bracket-location": [
|
|
189
|
+
"error",
|
|
190
|
+
"after-props"
|
|
191
|
+
],
|
|
192
|
+
// Validate closing tag location in JSX
|
|
193
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md
|
|
194
|
+
"react/jsx-closing-tag-location": "error",
|
|
195
|
+
// Enforce or disallow spaces inside of curly braces in JSX attributes
|
|
196
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
|
|
197
|
+
"react/jsx-curly-spacing": [
|
|
198
|
+
"error",
|
|
199
|
+
"never",
|
|
200
|
+
{
|
|
201
|
+
allowMultiline: true
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
// Enforce event handler naming conventions in JSX
|
|
205
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
|
|
206
|
+
"react/jsx-handler-names": [
|
|
207
|
+
"error",
|
|
208
|
+
{
|
|
209
|
+
eventHandlerPrefix: "on",
|
|
210
|
+
eventHandlerPropPrefix: "on"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
// Validate props indentation in JSX
|
|
214
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
|
|
215
|
+
"react/jsx-indent-props": [
|
|
216
|
+
"error",
|
|
217
|
+
2
|
|
218
|
+
],
|
|
219
|
+
// Validate JSX has key prop when in array or iterator
|
|
220
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
|
|
221
|
+
// Turned off because it has too many false positives
|
|
222
|
+
"react/jsx-key": "warn",
|
|
223
|
+
// Limit maximum of props on a single line in JSX
|
|
224
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
|
|
225
|
+
"react/jsx-max-props-per-line": [
|
|
226
|
+
"error",
|
|
227
|
+
{
|
|
228
|
+
maximum: 1,
|
|
229
|
+
when: "multiline"
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
// Prevent usage of .bind() in JSX props
|
|
233
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
|
|
234
|
+
"react/jsx-no-bind": [
|
|
235
|
+
"error",
|
|
236
|
+
{
|
|
237
|
+
ignoreRefs: true,
|
|
238
|
+
allowArrowFunctions: true,
|
|
239
|
+
allowFunctions: false,
|
|
240
|
+
allowBind: false,
|
|
241
|
+
ignoreDOMComponents: true
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
// Prevent duplicate props in JSX
|
|
245
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
|
|
246
|
+
"react/jsx-no-duplicate-props": [
|
|
247
|
+
"error",
|
|
248
|
+
{
|
|
249
|
+
ignoreCase: true
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
// Prevent usage of unwrapped JSX strings
|
|
253
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
|
|
254
|
+
"react/jsx-no-literals": [
|
|
255
|
+
"off",
|
|
256
|
+
{
|
|
257
|
+
noStrings: true
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
// Disallow undeclared variables in JSX
|
|
261
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
|
|
262
|
+
"react/jsx-no-undef": "error",
|
|
263
|
+
// Deprecated in favor of react/jsx-sort-props
|
|
264
|
+
"react/jsx-sort-prop-types": "off",
|
|
265
|
+
/**
|
|
266
|
+
* Require props to be sorted alphabetically.
|
|
267
|
+
*
|
|
268
|
+
* 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
|
|
269
|
+
*/
|
|
270
|
+
"react/jsx-sort-props": [
|
|
271
|
+
"warn",
|
|
272
|
+
{
|
|
273
|
+
ignoreCase: true,
|
|
274
|
+
callbacksLast: false,
|
|
275
|
+
shorthandFirst: false,
|
|
276
|
+
shorthandLast: false,
|
|
277
|
+
noSortAlphabetically: false,
|
|
278
|
+
reservedFirst: true
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
// Enforce defaultProps declarations alphabetical sorting
|
|
282
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-sort-default-props.md
|
|
283
|
+
"react/sort-default-props": [
|
|
284
|
+
"warn",
|
|
285
|
+
{
|
|
286
|
+
ignoreCase: true
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
// Prevent React to be incorrectly marked as unused
|
|
290
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
|
|
291
|
+
"react/jsx-uses-react": [
|
|
292
|
+
"error"
|
|
293
|
+
],
|
|
294
|
+
// Prevent variables used in JSX to be incorrectly marked as unused
|
|
295
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
|
|
296
|
+
"react/jsx-uses-vars": "error",
|
|
297
|
+
// Prevent usage of dangerous JSX properties
|
|
298
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md
|
|
299
|
+
"react/no-danger": "warn",
|
|
300
|
+
// Prevent usage of deprecated methods
|
|
301
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
|
|
302
|
+
"react/no-deprecated": [
|
|
303
|
+
"error"
|
|
304
|
+
],
|
|
305
|
+
// Prevent usage of setState in componentDidMount
|
|
306
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
|
|
307
|
+
// this is necessary for server-rendering
|
|
308
|
+
"react/no-did-mount-set-state": "off",
|
|
309
|
+
// Prevent usage of setState in componentDidUpdate
|
|
310
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
|
|
311
|
+
"react/no-did-update-set-state": "error",
|
|
312
|
+
// Prevent usage of setState in componentWillUpdate
|
|
313
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md
|
|
314
|
+
"react/no-will-update-set-state": "error",
|
|
315
|
+
// Prevent direct mutation of this.state
|
|
316
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
|
|
317
|
+
"react/no-direct-mutation-state": "off",
|
|
318
|
+
// Prevent usage of isMounted
|
|
319
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
|
|
320
|
+
"react/no-is-mounted": "error",
|
|
321
|
+
// Prevent multiple component definition per file
|
|
322
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
|
|
323
|
+
"react/no-multi-comp": "off",
|
|
324
|
+
// Prevent usage of setState
|
|
325
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-set-state.md
|
|
326
|
+
"react/no-set-state": "off",
|
|
327
|
+
// Prevent using string references
|
|
328
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
|
|
329
|
+
"react/no-string-refs": "error",
|
|
330
|
+
// Prevent usage of unknown DOM property
|
|
331
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
|
|
332
|
+
"react/no-unknown-property": "error",
|
|
333
|
+
// Require ES6 class declarations over React.createClass
|
|
334
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
|
|
335
|
+
"react/prefer-es6-class": [
|
|
336
|
+
"error",
|
|
337
|
+
"always"
|
|
338
|
+
],
|
|
339
|
+
// Require stateless functions when not using lifecycle methods, setState or ref
|
|
340
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
|
|
341
|
+
"react/prefer-stateless-function": [
|
|
342
|
+
"error",
|
|
343
|
+
{
|
|
344
|
+
ignorePureComponents: true
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
// Require render() methods to return something
|
|
348
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
|
|
349
|
+
"react/require-render-return": "error",
|
|
350
|
+
// Enforce component methods order
|
|
351
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md
|
|
352
|
+
"react/sort-comp": [
|
|
353
|
+
"error",
|
|
354
|
+
{
|
|
355
|
+
order: [
|
|
356
|
+
"static-variables",
|
|
357
|
+
"static-methods",
|
|
358
|
+
"instance-variables",
|
|
359
|
+
"lifecycle",
|
|
360
|
+
"/^handle.+$/",
|
|
361
|
+
"/^on.+$/",
|
|
362
|
+
"getters",
|
|
363
|
+
"setters",
|
|
364
|
+
"/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/",
|
|
365
|
+
"instance-methods",
|
|
366
|
+
"everything-else",
|
|
367
|
+
"rendering"
|
|
368
|
+
],
|
|
369
|
+
groups: {
|
|
370
|
+
lifecycle: [
|
|
371
|
+
"displayName",
|
|
372
|
+
"propTypes",
|
|
373
|
+
"contextTypes",
|
|
374
|
+
"childContextTypes",
|
|
375
|
+
"mixins",
|
|
376
|
+
"statics",
|
|
377
|
+
"defaultProps",
|
|
378
|
+
"constructor",
|
|
379
|
+
"getDefaultProps",
|
|
380
|
+
"getInitialState",
|
|
381
|
+
"state",
|
|
382
|
+
"getChildContext",
|
|
383
|
+
"getDerivedStateFromProps",
|
|
384
|
+
"componentWillMount",
|
|
385
|
+
"UNSAFE_componentWillMount",
|
|
386
|
+
"componentDidMount",
|
|
387
|
+
"componentWillReceiveProps",
|
|
388
|
+
"UNSAFE_componentWillReceiveProps",
|
|
389
|
+
"shouldComponentUpdate",
|
|
390
|
+
"componentWillUpdate",
|
|
391
|
+
"UNSAFE_componentWillUpdate",
|
|
392
|
+
"getSnapshotBeforeUpdate",
|
|
393
|
+
"componentDidUpdate",
|
|
394
|
+
"componentDidCatch",
|
|
395
|
+
"componentWillUnmount"
|
|
396
|
+
],
|
|
397
|
+
rendering: [
|
|
398
|
+
"/^render.+$/",
|
|
399
|
+
"render"
|
|
400
|
+
]
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
// Prevent missing parentheses around multilines JSX
|
|
405
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md
|
|
406
|
+
"react/jsx-wrap-multilines": [
|
|
407
|
+
"error",
|
|
408
|
+
{
|
|
409
|
+
declaration: "parens-new-line",
|
|
410
|
+
assignment: "parens-new-line",
|
|
411
|
+
return: "parens-new-line",
|
|
412
|
+
arrow: "parens-new-line",
|
|
413
|
+
condition: "parens-new-line",
|
|
414
|
+
logical: "parens-new-line",
|
|
415
|
+
prop: "parens-new-line"
|
|
416
|
+
}
|
|
417
|
+
],
|
|
418
|
+
// Require that the first prop in a JSX element be on a new line when the element is multiline
|
|
419
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md
|
|
420
|
+
"react/jsx-first-prop-new-line": [
|
|
421
|
+
"error",
|
|
422
|
+
"multiline-multiprop"
|
|
423
|
+
],
|
|
424
|
+
// Enforce spacing around jsx equals signs
|
|
425
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md
|
|
426
|
+
"react/jsx-equals-spacing": [
|
|
427
|
+
"error",
|
|
428
|
+
"never"
|
|
429
|
+
],
|
|
430
|
+
// Enforce JSX indentation
|
|
431
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md
|
|
432
|
+
"react/jsx-indent": [
|
|
433
|
+
"error",
|
|
434
|
+
2
|
|
435
|
+
],
|
|
436
|
+
// only ".jsx", ".tsx", or ".mdx" files may have JSX
|
|
437
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
|
|
438
|
+
"react/jsx-filename-extension": [
|
|
439
|
+
"error",
|
|
440
|
+
{
|
|
441
|
+
extensions: [
|
|
442
|
+
".jsx",
|
|
443
|
+
".tsx",
|
|
444
|
+
".mdx"
|
|
445
|
+
]
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
// prevent accidental JS comments from being injected into JSX as text
|
|
449
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
|
|
450
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
451
|
+
// disallow using React.render/ReactDOM.render's return value
|
|
452
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
|
|
453
|
+
"react/no-render-return-value": "error",
|
|
454
|
+
// require a shouldComponentUpdate method, or PureRenderMixin
|
|
455
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-optimization.md
|
|
456
|
+
"react/require-optimization": [
|
|
457
|
+
"off",
|
|
458
|
+
{
|
|
459
|
+
allowDecorators: []
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
// warn against using findDOMNode()
|
|
463
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
|
|
464
|
+
"react/no-find-dom-node": "error",
|
|
465
|
+
// Forbid certain props on Components
|
|
466
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md
|
|
467
|
+
"react/forbid-component-props": [
|
|
468
|
+
"off",
|
|
469
|
+
{
|
|
470
|
+
forbid: []
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
// Forbid certain elements
|
|
474
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md
|
|
475
|
+
"react/forbid-elements": [
|
|
476
|
+
"off",
|
|
477
|
+
{
|
|
478
|
+
forbid: []
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
// Prevent problem with children and props.dangerouslySetInnerHTML
|
|
482
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md
|
|
483
|
+
"react/no-danger-with-children": "error",
|
|
484
|
+
// Prevent unused propType definitions
|
|
485
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md
|
|
486
|
+
"react/no-unused-prop-types": [
|
|
487
|
+
"error",
|
|
488
|
+
{
|
|
489
|
+
customValidators: [],
|
|
490
|
+
skipShapeProps: true
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
// Require style prop value be an object or var
|
|
494
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
|
|
495
|
+
"react/style-prop-object": "error",
|
|
496
|
+
// Prevent invalid characters from appearing in markup
|
|
497
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
|
|
498
|
+
"react/no-unescaped-entities": "error",
|
|
499
|
+
// Prevent passing of children as props
|
|
500
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
|
|
501
|
+
"react/no-children-prop": "error",
|
|
502
|
+
// Validate whitespace in and around the JSX opening and closing brackets
|
|
503
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md
|
|
504
|
+
"react/jsx-tag-spacing": [
|
|
505
|
+
"error",
|
|
506
|
+
{
|
|
507
|
+
closingSlash: "never",
|
|
508
|
+
beforeSelfClosing: "always",
|
|
509
|
+
afterOpening: "never",
|
|
510
|
+
beforeClosing: "never"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
// Enforce spaces before the closing bracket of self-closing JSX elements
|
|
514
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
|
|
515
|
+
// Deprecated in favor of jsx-tag-spacing
|
|
516
|
+
"react/jsx-space-before-closing": [
|
|
517
|
+
"off",
|
|
518
|
+
"always"
|
|
519
|
+
],
|
|
520
|
+
// Enforce a defaultProps definition for every prop that is not a required prop
|
|
521
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md
|
|
522
|
+
"react/require-default-props": [
|
|
523
|
+
"error",
|
|
524
|
+
{
|
|
525
|
+
forbidDefaultForRequired: true
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
// Forbids using non-exported propTypes
|
|
529
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
|
|
530
|
+
// this is intentionally set to "warn". it would be "error",
|
|
531
|
+
// but it's only critical if you're stripping propTypes in production.
|
|
532
|
+
"react/forbid-foreign-prop-types": [
|
|
533
|
+
"warn",
|
|
534
|
+
{
|
|
535
|
+
allowInPropTypes: true
|
|
536
|
+
}
|
|
537
|
+
],
|
|
538
|
+
// Prevent void DOM elements from receiving children
|
|
539
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
|
|
540
|
+
"react/void-dom-elements-no-children": "error",
|
|
541
|
+
// Enforce all defaultProps have a corresponding non-required PropType
|
|
542
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md
|
|
543
|
+
"react/default-props-match-prop-types": [
|
|
544
|
+
"error",
|
|
545
|
+
{
|
|
546
|
+
allowRequiredDefaults: false
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
// Prevent usage of shouldComponentUpdate when extending React.PureComponent
|
|
550
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md
|
|
551
|
+
"react/no-redundant-should-component-update": "error",
|
|
552
|
+
// Prevent unused state values
|
|
553
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/pull/1103/
|
|
554
|
+
"react/no-unused-state": "error",
|
|
555
|
+
// Enforces consistent naming for boolean props
|
|
556
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md
|
|
557
|
+
"react/boolean-prop-naming": [
|
|
558
|
+
"off",
|
|
559
|
+
{
|
|
560
|
+
propTypeNames: [
|
|
561
|
+
"bool",
|
|
562
|
+
"mutuallyExclusiveTrueProps"
|
|
563
|
+
],
|
|
564
|
+
rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+",
|
|
565
|
+
message: ""
|
|
566
|
+
}
|
|
567
|
+
],
|
|
568
|
+
// Prevents common casing typos
|
|
569
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md
|
|
570
|
+
"react/no-typos": "error",
|
|
571
|
+
// One JSX Element Per Line
|
|
572
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md
|
|
573
|
+
"react/jsx-one-expression-per-line": [
|
|
574
|
+
"error",
|
|
575
|
+
{
|
|
576
|
+
allow: "single-child"
|
|
577
|
+
}
|
|
578
|
+
],
|
|
579
|
+
// Enforce consistent usage of destructuring assignment of props, state, and context
|
|
580
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md
|
|
581
|
+
"react/destructuring-assignment": [
|
|
582
|
+
"error",
|
|
583
|
+
"always"
|
|
584
|
+
],
|
|
585
|
+
// Prevent using this.state within a this.setState
|
|
586
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md
|
|
587
|
+
"react/no-access-state-in-setstate": "error",
|
|
588
|
+
// Ensures inline tags are not rendered without spaces between them
|
|
589
|
+
"react/jsx-child-element-spacing": "off",
|
|
590
|
+
// Prevent this from being used in stateless functional components
|
|
591
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md
|
|
592
|
+
"react/no-this-in-sfc": "error",
|
|
593
|
+
// Validate JSX maximum depth
|
|
594
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md
|
|
595
|
+
"react/jsx-max-depth": "off",
|
|
596
|
+
// Disallow multiple spaces between inline JSX props
|
|
597
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md
|
|
598
|
+
"react/jsx-props-no-multi-spaces": "error",
|
|
599
|
+
// Prevent usage of UNSAFE_ methods
|
|
600
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md
|
|
601
|
+
"react/no-unsafe": "off",
|
|
602
|
+
// Enforce linebreaks in curly braces in JSX attributes and expressions.
|
|
603
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md
|
|
604
|
+
"react/jsx-curly-newline": [
|
|
605
|
+
"error",
|
|
606
|
+
{
|
|
607
|
+
multiline: "consistent",
|
|
608
|
+
singleline: "consistent"
|
|
609
|
+
}
|
|
610
|
+
],
|
|
611
|
+
// Enforce state initialization style
|
|
612
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md
|
|
613
|
+
// TODO: set to "never" once babel-preset-airbnb supports public class fields
|
|
614
|
+
"react/state-in-constructor": [
|
|
615
|
+
"error",
|
|
616
|
+
"always"
|
|
617
|
+
],
|
|
618
|
+
// Enforces where React component static properties should be positioned
|
|
619
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md
|
|
620
|
+
// TODO: set to "static public field" once babel-preset-airbnb supports public class fields
|
|
621
|
+
"react/static-property-placement": [
|
|
622
|
+
"error",
|
|
623
|
+
"property assignment"
|
|
624
|
+
],
|
|
625
|
+
// Disallow JSX props spreading
|
|
626
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
|
|
627
|
+
"react/jsx-props-no-spreading": [
|
|
628
|
+
"off",
|
|
629
|
+
{
|
|
630
|
+
html: "enforce",
|
|
631
|
+
custom: "enforce",
|
|
632
|
+
explicitSpread: "ignore",
|
|
633
|
+
exceptions: []
|
|
634
|
+
}
|
|
635
|
+
],
|
|
636
|
+
// Enforce that props are read-only
|
|
637
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md
|
|
638
|
+
"react/prefer-read-only-props": "off",
|
|
639
|
+
// Prevent usage of `javascript:` URLs
|
|
640
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
|
|
641
|
+
"react/jsx-no-script-url": [
|
|
642
|
+
"error",
|
|
643
|
+
[
|
|
644
|
+
{
|
|
645
|
+
name: "Link",
|
|
646
|
+
props: [
|
|
647
|
+
"to"
|
|
648
|
+
]
|
|
649
|
+
}
|
|
650
|
+
]
|
|
651
|
+
],
|
|
652
|
+
// Prevent adjacent inline elements not separated by whitespace
|
|
653
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
|
|
654
|
+
// TODO: enable? semver-major
|
|
655
|
+
"react/no-adjacent-inline-elements": "off",
|
|
656
|
+
// Enforce a new line after jsx elements and expressions
|
|
657
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-newline.md
|
|
658
|
+
"react/jsx-newline": "off",
|
|
659
|
+
// Prevent react contexts from taking non-stable values
|
|
660
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md
|
|
661
|
+
"react/jsx-no-constructed-context-values": "error",
|
|
662
|
+
// Enforce that namespaces are not used in React elements
|
|
663
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/no-namespace.md
|
|
664
|
+
"react/no-namespace": "error",
|
|
665
|
+
// Prefer exact proptype definitions
|
|
666
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/prefer-exact-props.md
|
|
667
|
+
"react/prefer-exact-props": "error",
|
|
668
|
+
// Lifecycle methods should be methods on the prototype, not class fields
|
|
669
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-arrow-function-lifecycle.md
|
|
670
|
+
"react/no-arrow-function-lifecycle": "error",
|
|
671
|
+
// Prevent usage of invalid attributes
|
|
672
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-invalid-html-attribute.md
|
|
673
|
+
"react/no-invalid-html-attribute": "error",
|
|
674
|
+
// Prevent declaring unused methods of component class
|
|
675
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-unused-class-component-methods.md
|
|
676
|
+
"react/no-unused-class-component-methods": "error",
|
|
677
|
+
// Enforce sandbox attribute on iframe elements
|
|
678
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/c8833f301314dab3e79ef7ac4cf863e4d5fa0019/docs/rules/iframe-missing-sandbox.md
|
|
679
|
+
// TODO: semver-major, enable
|
|
680
|
+
"react/iframe-missing-sandbox": "off",
|
|
681
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/66b58dd4864678eb869a7bf434c72ff7ac530eb1/docs/rules/no-object-type-as-default-prop.md
|
|
682
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/66b58dd4864678eb869a7bf434c72ff7ac530eb1/docs/rules/no-object-type-as-default-prop.md
|
|
683
|
+
// TODO: semver-major, enable
|
|
684
|
+
"react/no-object-type-as-default-prop": "off"
|
|
685
|
+
};
|
|
686
|
+
var react_default = config;
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
exports.default = react_default;
|