File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
packages/eslint-config-airbnb/rules Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = {
2
2
plugins : [
3
- 'react'
3
+ 'react' ,
4
4
] ,
5
5
parserOptions : {
6
6
ecmaFeatures : {
7
7
jsx : true ,
8
8
} ,
9
9
} ,
10
10
ecmaFeatures : {
11
- jsx : true
11
+ jsx : true ,
12
12
} ,
13
13
14
14
// View link below for react rules documentation
@@ -18,6 +18,21 @@ module.exports = {
18
18
// http://eslint.org/docs/rules/jsx-quotes
19
19
'jsx-quotes' : [ 'error' , 'prefer-double' ] ,
20
20
21
+ 'class-methods-use-this' : [ 'error' , {
22
+ exceptMethods : [
23
+ 'render' ,
24
+ 'getInitialState' ,
25
+ 'getDefaultProps' ,
26
+ 'componentWillMount' ,
27
+ 'componentDidMount' ,
28
+ 'componentWillReceiveProps' ,
29
+ 'shouldComponentUpdate' ,
30
+ 'componentWillUpdate' ,
31
+ 'componentDidUpdate' ,
32
+ 'componentWillUnmount' ,
33
+ ] ,
34
+ } ] ,
35
+
21
36
// Prevent missing displayName in a React component definition
22
37
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
23
38
'react/display-name' : [ 'off' , { ignoreTranspilerName : false } ] ,
You can’t perform that action at this time.
0 commit comments