You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Enforce ES5 or ES6 class for returning value in render function (require-render-return)
2
+
3
+
When writing the `render` method in a component it could be easy to forgot to return the JSX content. This rule will warn you if the `return` statement is missing.
4
+
5
+
## Rule Details
6
+
7
+
The following patterns are considered warnings:
8
+
9
+
```js
10
+
var Hello =React.createClass({
11
+
render() {
12
+
<div>Hello</div>;
13
+
}
14
+
});
15
+
16
+
classHelloextendsReact.Component {
17
+
render() {
18
+
<div>Hello</div>;
19
+
}
20
+
}
21
+
```
22
+
23
+
The following patterns are not considered warnings:
0 commit comments