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 11module . exports = {
22 plugins : [
3- 'react'
3+ 'react' ,
44 ] ,
55 parserOptions : {
66 ecmaFeatures : {
77 jsx : true ,
88 } ,
99 } ,
1010 ecmaFeatures : {
11- jsx : true
11+ jsx : true ,
1212 } ,
1313
1414 // View link below for react rules documentation
@@ -18,6 +18,21 @@ module.exports = {
1818 // http://eslint.org/docs/rules/jsx-quotes
1919 'jsx-quotes' : [ 'error' , 'prefer-double' ] ,
2020
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+
2136 // Prevent missing displayName in a React component definition
2237 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
2338 'react/display-name' : [ 'off' , { ignoreTranspilerName : false } ] ,
You can’t perform that action at this time.
0 commit comments