@houheaven/eslint-config-helper 2.1.2 → 2.1.5

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.
@@ -128,5 +128,21 @@ module.exports = {
128
128
  // ❌ 已废弃
129
129
  // https://zh-hans.eslint.org/docs/latest/rules/valid-jsdoc
130
130
  "valid-jsdoc": "off",
131
+
132
+ // 禁止冗余的括号
133
+ // https://zh-hans.eslint.org/docs/latest/rules/no-extra-parens
134
+ "no-extra-parens": ["warn", "all", {
135
+ conditionalAssign: false, // 允许在条件测试表达式中的赋值周围加上括号
136
+ returnAssign: false, // 允许在 return 语句中使用额外的小括号
137
+ nestedBinaryExpressions: false, // 允许在嵌套二进制表达式中使用额外的小括号
138
+ ternaryOperandBinaryExpressions: false, // 允许在三元运算符 ?: 的操作数周围添加额外的括号
139
+ ignoreJSX: "all", // 允许在没有/所有/多行/单行 JSX 组件周围使用额外的小括号,delegate to eslint-plugin-react
140
+ // enforceForArrowConditionals: false, // 废弃 - 允许在作为箭头函数主体的三元表达式周围添加小括号
141
+ enforceForSequenceExpressions: false, // 允许在序列表达式周围加上小括号
142
+ // enforceForNewInMemberExpressions: false, // 废弃 - 允许在成员表达式中的 new 表达式周围使用额外的小括号
143
+ enforceForFunctionPrototypeMethods: false, // 允许在函数表达式的即时 .call 和 .apply 方法调用周围以及同一上下文中的函数表达式周围添加括号
144
+ allowParensAfterCommentPattern: "", // 允许在匹配正则表达式的注释前面加上额外的括号
145
+ // nestedConditionalExpressions: false, // 允许在嵌套的条件表达式周围添加额外的小括号
146
+ }],
131
147
  },
132
148
  };
@@ -237,23 +237,6 @@ module.exports = {
237
237
  ignoreChainWithDepth: 4,
238
238
  }],
239
239
 
240
- // TODO
241
- // 禁止冗余的括号
242
- // https://zh-hans.eslint.org/docs/latest/rules/no-extra-parens
243
- "no-extra-parens": ["warn", "all", {
244
- conditionalAssign: false, // 允许在条件测试表达式中的赋值周围加上括号
245
- returnAssign: false, // 允许在 return 语句中使用额外的小括号
246
- nestedBinaryExpressions: false, // 允许在嵌套二进制表达式中使用额外的小括号
247
- ternaryOperandBinaryExpressions: false, // 允许在三元运算符 ?: 的操作数周围添加额外的括号
248
- ignoreJSX: "all", // 允许在没有/所有/多行/单行 JSX 组件周围使用额外的小括号,delegate to eslint-plugin-react
249
- enforceForArrowConditionals: false, // 废弃 - 允许在作为箭头函数主体的三元表达式周围添加小括号
250
- enforceForSequenceExpressions: false, // 允许在序列表达式周围加上小括号
251
- enforceForNewInMemberExpressions: false, // 废弃 - 允许在成员表达式中的 new 表达式周围使用额外的小括号
252
- enforceForFunctionPrototypeMethods: false, // 允许在函数表达式的即时 .call 和 .apply 方法调用周围以及同一上下文中的函数表达式周围添加括号
253
- allowParensAfterCommentPattern: "", // 允许在匹配正则表达式的注释前面加上额外的括号
254
- // nestedConditionalExpressions: false, // 允许在嵌套的条件表达式周围添加额外的小括号
255
- }],
256
-
257
240
  // 禁止空格和 tab 的混合缩进
258
241
  "no-mixed-spaces-and-tabs": "error",
259
242
 
@@ -20,5 +20,19 @@ module.exports = {
20
20
  maxBOF: 1,
21
21
  maxEOF: 1,
22
22
  }],
23
+
24
+ // 禁止冗余的括号
25
+ // https://eslint.style/rules/no-extra-parens
26
+ "@stylistic/no-extra-parens": ["warn", "all", {
27
+ conditionalAssign: false, // 允许在条件测试表达式中的赋值周围加上括号
28
+ returnAssign: false, // 允许在 return 语句中使用额外的小括号
29
+ nestedBinaryExpressions: false, // 允许在嵌套二进制表达式中使用额外的小括号
30
+ ternaryOperandBinaryExpressions: false, // 允许在三元运算符 ?: 的操作数周围添加额外的括号
31
+ ignoreJSX: "all", // 允许在没有/所有/多行/单行 JSX 组件周围使用额外的小括号,delegate to eslint-plugin-react
32
+ enforceForSequenceExpressions: false, // 允许在序列表达式周围加上小括号
33
+ enforceForFunctionPrototypeMethods: false, // 允许在函数表达式的即时 .call 和 .apply 方法调用周围以及同一上下文中的函数表达式周围添加括号
34
+ allowParensAfterCommentPattern: "", // 允许在匹配正则表达式的注释前面加上额外的括号
35
+ nestedConditionalExpressions: false, // 允许在嵌套的条件表达式周围添加额外的小括号
36
+ }],
23
37
  },
24
38
  };
@@ -0,0 +1,29 @@
1
+
2
+ // ==========================================================
3
+ // eslint-plugin-react - deprecated
4
+ // ----------------------------------------------------------
5
+ // 已弃用规则,会用 replacedBy 迁移到新规则;配置一律保持 "off",
6
+ // 演示时在示例文件里通过 /* eslint react/xxx: "error" */ 临时启用。
7
+ // ==========================================================
8
+
9
+ module.exports = {
10
+ rules: {
11
+ // 排序 defaultProps
12
+ // ----------------------------------------------------------
13
+ // 已废弃(v7.33.0),替换为 react/sort-default-props
14
+ // 官方推荐:无(deprecated 规则一律不进入 recommended)
15
+ // 社区最佳:保持 "off",改用 react/sort-default-props 或
16
+ // typescript-eslint 的 sort-type-constituents
17
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md
18
+ "react/jsx-sort-default-props": "off",
19
+
20
+ // JSX 闭合前空格
21
+ // ----------------------------------------------------------
22
+ // 已废弃(v7.4.0),替换为 react/jsx-tag-spacing
23
+ // 官方推荐:无(deprecated 规则一律不进入 recommended)
24
+ // 社区最佳:保持 "off",改用 react/jsx-tag-spacing(更完整地覆盖
25
+ // before/after 空格控制)
26
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
27
+ "react/jsx-space-before-closing": "off",
28
+ },
29
+ };
@@ -0,0 +1,170 @@
1
+
2
+ // ==========================================================
3
+ // eslint-plugin-react - class-component
4
+ // ----------------------------------------------------------
5
+ // class 组件 / 生命周期 / this 语义相关
6
+ // ==========================================================
7
+
8
+ module.exports = {
9
+ rules: {
10
+ // 禁止在 setState 里直接引用 this.state(会导致基于旧值的并发问题)
11
+ // ----------------------------------------------------------
12
+ // 官方推荐:无(未进入 recommended)
13
+ // 社区最佳:Airbnb / Next.js 均设为 error(此规则强烈推荐,React 官方也建议改用函数形式 setState(prev => ...))
14
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.md
15
+ "react/no-access-state-in-setstate": "error",
16
+
17
+ // 禁止在 componentDidMount 内 setState(触发额外一次 render,影响性能)
18
+ // ----------------------------------------------------------
19
+ // 官方推荐:无
20
+ // options: "disallow-in-func"(同时禁止 mount 里的回调函数中 setState)
21
+ // 社区最佳:多数场景使用默认值即可;严格团队用 "disallow-in-func"
22
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
23
+ "react/no-did-mount-set-state": "error",
24
+
25
+ // 禁止在 componentDidUpdate 内 setState(无条件调用会形成死循环)
26
+ // ----------------------------------------------------------
27
+ // 官方推荐:无
28
+ // options: "disallow-in-func"
29
+ // 社区最佳:默认即可(无条件的 setState 才会死循环,带条件的合理场景也被拦是常见抱怨)
30
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
31
+ "react/no-did-update-set-state": "error",
32
+
33
+ // 禁止在 componentWillUpdate 内 setState(该生命周期已被 UNSAFE_)
34
+ // ----------------------------------------------------------
35
+ // 官方推荐:无
36
+ // options: "disallow-in-func"
37
+ // 社区最佳:默认即可
38
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md
39
+ "react/no-will-update-set-state": "error",
40
+
41
+ // 禁止使用 setState(面向"纯函数组件 + hooks"的极端严格模式)
42
+ // ----------------------------------------------------------
43
+ // 官方推荐:无
44
+ // 社区最佳:默认关闭;老项目 / 混合项目会导致大量误报
45
+ "react/no-set-state": "off",
46
+
47
+ // 禁止直接修改 this.state(会导致 UI 与 state 不一致,绕过 setState)
48
+ // ----------------------------------------------------------
49
+ // 官方推荐:recommended(默认 error)
50
+ // 社区最佳:所有主流 config 都直接沿用
51
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
52
+ "react/no-direct-mutation-state": "error",
53
+
54
+ // 禁止调用 this.isMounted()(该 API 已废弃)
55
+ // ----------------------------------------------------------
56
+ // 官方推荐:recommended(默认 error)
57
+ "react/no-is-mounted": "error",
58
+
59
+ // 单文件禁止定义多个组件
60
+ // ----------------------------------------------------------
61
+ // 官方推荐:无
62
+ // options: { ignoreStateless: false }(默认,函数组件也算)
63
+ // 社区最佳:{ ignoreStateless: true } —— 允许把小型函数组件写在同一文件(Airbnb 采用)
64
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
65
+ "react/no-multi-comp": ["error", { ignoreStateless: true }],
66
+
67
+ // 禁止冗余的 shouldComponentUpdate(继承自 PureComponent 时再手写就是冗余)
68
+ // ----------------------------------------------------------
69
+ // 官方推荐:无
70
+ // 社区最佳:error(Airbnb 采用)
71
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md
72
+ "react/no-redundant-should-component-update": "error",
73
+
74
+ // 禁止字符串 ref(React 17+ 已完全废弃)
75
+ // ----------------------------------------------------------
76
+ // 官方推荐:recommended(默认 error)
77
+ // options: { noTemplateLiterals: true }(额外禁止模板字符串 ref)
78
+ // 社区最佳:{ noTemplateLiterals: true }(拦得更严)
79
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
80
+ "react/no-string-refs": ["error", { noTemplateLiterals: true }],
81
+
82
+ // 禁止在函数组件中使用 this(this 在函数组件里通常是 undefined 或全局对象)
83
+ // ----------------------------------------------------------
84
+ // 官方推荐:无
85
+ // 社区最佳:error(Airbnb / TypeScript 严格模板均采用)
86
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md
87
+ "react/no-this-in-sfc": "error",
88
+
89
+ // 生命周期名 / propTypes 名拼写错误检测
90
+ // ----------------------------------------------------------
91
+ // 官方推荐:无
92
+ // 社区最佳:error(成本极低,能拦下 componenetDidMount 这种致命拼错)
93
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-typos.md
94
+ "react/no-typos": "error",
95
+
96
+ // 禁止使用不安全的生命周期(componentWillMount / WillReceiveProps / WillUpdate)
97
+ // ----------------------------------------------------------
98
+ // 官方推荐:recommended(默认 error)
99
+ // options: { checkAliases: true }(连 UNSAFE_ 前缀别名也一起检查)
100
+ // 社区最佳:使用默认即可;严格团队加 { checkAliases: true }
101
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md
102
+ "react/no-unsafe": "error",
103
+
104
+ // 禁止 class 组件里存在未使用的方法
105
+ // ----------------------------------------------------------
106
+ // 官方推荐:无
107
+ // options: { ignore: ["someLifecycle"] }(忽略指定方法)
108
+ // 社区最佳:error(对代码质量提升明显)
109
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-class-component-methods.md
110
+ "react/no-unused-class-component-methods": "error",
111
+
112
+ // 禁止未使用的 state
113
+ // ----------------------------------------------------------
114
+ // 官方推荐:无
115
+ // 社区最佳:error(能揭示"忘记消费的 state 字段")
116
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-state.md
117
+ "react/no-unused-state": "error",
118
+
119
+ // 优先使用 ES6 class 而不是 createReactClass
120
+ // ----------------------------------------------------------
121
+ // 官方推荐:无
122
+ // 社区最佳:error(React 官方已把 createReactClass 抽为独立包,视为遗留 API)
123
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
124
+ "react/prefer-es6-class": ["error", "always"],
125
+
126
+ // 无 state / 生命周期时优先使用函数组件
127
+ // ----------------------------------------------------------
128
+ // 官方推荐:无
129
+ // options: { ignorePureComponents: true }(PureComponent 不强制)
130
+ // 社区最佳:error
131
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
132
+ "react/prefer-stateless-function": ["error", { ignorePureComponents: true }],
133
+
134
+ // render 必须显式 return
135
+ // ----------------------------------------------------------
136
+ // 官方推荐:recommended(默认 error)
137
+ "react/require-render-return": "error",
138
+
139
+ // 生命周期与方法排序
140
+ // ----------------------------------------------------------
141
+ // 官方推荐:无
142
+ // options: { order: ["static-methods", "lifecycle", "everything-else", "render"] }(默认)
143
+ // 社区最佳:error
144
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-comp.md
145
+ "react/sort-comp": "error",
146
+
147
+ // state 必须在 constructor 中初始化 / 或字段初始化
148
+ // ----------------------------------------------------------
149
+ // 官方推荐:无
150
+ // options: "always"(默认,只能在 constructor 里初始化)| "never"(只能用 class field)
151
+ // 社区最佳:"never"(React 官方文档和 Airbnb 都倾向 class field 语法)
152
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md
153
+ "react/state-in-constructor": ["error", "never"],
154
+
155
+ // 静态属性放置方式(static 字段 / 类外赋值)
156
+ // ----------------------------------------------------------
157
+ // 官方推荐:无
158
+ // options: "static public field"(默认,推荐)| "property assignment"
159
+ // 社区最佳:static public field
160
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md
161
+ "react/static-property-placement": ["error", "static public field"],
162
+
163
+ // 组件必须有 displayName(否则 DevTools 显示为 Anonymous)
164
+ // ----------------------------------------------------------
165
+ // 官方推荐:recommended(默认 error)
166
+ // options: { ignoreTranspilerName: false }(默认)
167
+ // 社区最佳:默认即可
168
+ "react/display-name": "error",
169
+ },
170
+ };
@@ -0,0 +1,140 @@
1
+
2
+ // ==========================================================
3
+ // eslint-plugin-react - dom
4
+ // ----------------------------------------------------------
5
+ // DOM 元素 / 安全 / 常见错误
6
+ // ==========================================================
7
+
8
+ module.exports = {
9
+ rules: {
10
+ // <button> 必须显式指定 type
11
+ // ----------------------------------------------------------
12
+ // 官方推荐:无(未进入 recommended)
13
+ // options: { button: true, submit: true, reset: true }
14
+ // 分别控制是否允许该类型
15
+ // 社区最佳:["error", { reset: false }]
16
+ // - <button type="reset"> 会清空所在 <form>,误触发风险高,Airbnb/Next.js 都禁用
17
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
18
+ "react/button-has-type": ["error", { reset: false }],
19
+
20
+ // checked 必须搭配 onChange / readOnly
21
+ // ----------------------------------------------------------
22
+ // 官方推荐:无
23
+ // 社区最佳:["error"]
24
+ // - 只写 checked 会得到"受控组件却不受控"的运行时 warning
25
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
26
+ "react/checked-requires-onchange-or-readonly": "error",
27
+
28
+ // <iframe> 必须带 sandbox
29
+ // ----------------------------------------------------------
30
+ // 官方推荐:无(安全类规则)
31
+ // 社区最佳:["error"]
32
+ // - Snyk / OWASP 都建议默认给 iframe 加 sandbox 属性
33
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md
34
+ "react/iframe-missing-sandbox": "error",
35
+
36
+ // 禁止相邻内联元素(可能被搜索引擎/屏幕阅读器合并)
37
+ // ----------------------------------------------------------
38
+ // 官方推荐:无
39
+ // 社区最佳:["error"]
40
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
41
+ "react/no-adjacent-inline-elements": "error",
42
+
43
+ // 禁止用数组 index 作为 key
44
+ // ----------------------------------------------------------
45
+ // 官方推荐:无
46
+ // 社区最佳:["error"]
47
+ // - 极少数场景(静态、只增不删且不重排的列表)用 index 是合理的
48
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
49
+ "react/no-array-index-key": "error",
50
+
51
+ // 禁止将 children 通过 prop 传入
52
+ // ----------------------------------------------------------
53
+ // 官方推荐:recommended(默认 error)
54
+ // options: { allowFunctions: false }(默认 false)
55
+ // - 是否允许函数式 children prop(render props 模式)
56
+ // 社区最佳:["error", { allowFunctions: true }](render props 是合法模式)
57
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
58
+ "react/no-children-prop": ["error", { allowFunctions: true }],
59
+
60
+ // 禁止使用 dangerouslySetInnerHTML
61
+ // ----------------------------------------------------------
62
+ // 官方推荐:无
63
+ // 社区最佳:["error"]
64
+ // - 有合法场景(渲染富文本)
65
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md
66
+ "react/no-danger": "error",
67
+
68
+ // dangerouslySetInnerHTML 与 children 不能共存
69
+ // ----------------------------------------------------------
70
+ // 官方推荐:recommended(默认 error)
71
+ // 社区最佳:["error"](与 recommended 一致)
72
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md
73
+ "react/no-danger-with-children": "error",
74
+
75
+ // 禁止使用已废弃的 API
76
+ // ----------------------------------------------------------
77
+ // 官方推荐:recommended(默认 error)
78
+ // 社区最佳:["error"]
79
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
80
+ "react/no-deprecated": "error",
81
+
82
+ // 禁止 findDOMNode
83
+ // ----------------------------------------------------------
84
+ // 官方推荐:recommended(默认 error)
85
+ // 社区最佳:["error"](React 18 已 deprecated,React 19 移除)
86
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
87
+ "react/no-find-dom-node": "error",
88
+
89
+ // 禁止使用命名空间标签(如 <ns:tag/>)
90
+ // ----------------------------------------------------------
91
+ // 官方推荐:无
92
+ // 社区最佳:["error"]
93
+ // - React 不支持 XML 命名空间语法,写了必然出错
94
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-namespace.md
95
+ "react/no-namespace": "error",
96
+
97
+ // 禁止把 ReactDOM.render 的返回值当组件实例使用
98
+ // ----------------------------------------------------------
99
+ // 官方推荐:recommended(默认 error)
100
+ // 社区最佳:["error"]
101
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
102
+ "react/no-render-return-value": "error",
103
+
104
+ // 禁止在 render 里定义嵌套组件
105
+ // ----------------------------------------------------------
106
+ // 官方推荐:无
107
+ // options: { allowAsProps: false, propNamePattern: undefined }
108
+ // - allowAsProps: 是否允许作为 render prop 传入
109
+ // 社区最佳:["error", { allowAsProps: true }](render prop 是合法模式)
110
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
111
+ "react/no-unstable-nested-components": ["error", { allowAsProps: true }],
112
+
113
+ // 要求使用 PureComponent / memo
114
+ // ----------------------------------------------------------
115
+ // 官方推荐:无
116
+ // 社区最佳:"off"
117
+ // - 强制所有组件用 PureComponent/memo 反而会让代码更复杂、增加内存
118
+ // - Airbnb / Next.js / CRA 都不启用
119
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-optimization.md
120
+ "react/require-optimization": "off",
121
+
122
+ // style 属性必须是对象
123
+ // ----------------------------------------------------------
124
+ // 官方推荐:无
125
+ // options: { allow: [] }
126
+ // - 排除某些自定义组件(如 styled-components 里可能允许字符串)
127
+ // 社区最佳:["error"]
128
+ // - React 的 style 只接受对象,写字符串是常见新手错误
129
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
130
+ "react/style-prop-object": "error",
131
+
132
+ // void 元素(如 <br/>)不允许 children
133
+ // ----------------------------------------------------------
134
+ // 官方推荐:无
135
+ // 社区最佳:["error"]
136
+ // - <br>text</br> / <img>content</img> 都是无效 HTML
137
+ // - 官方文档:https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
138
+ "react/void-dom-elements-no-children": "error",
139
+ },
140
+ };