@@ -10,7 +10,7 @@ module.exports = {
10
10
'rules' : {
11
11
// Prevent missing displayName in a React component definition
12
12
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
13
- 'react/display-name' : 0 ,
13
+ 'react/display-name' : [ 0 , { 'acceptTranspilerName' , false } ] ,
14
14
// Forbid certain propTypes (any, array, object)
15
15
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md
16
16
'react/forbid-prop-types' : [ 0 , { 'forbid' : [ 'any' , 'array' , 'object' ] } ] ,
@@ -22,7 +22,7 @@ module.exports = {
22
22
'react/jsx-closing-bracket-location' : [ 2 , 'line-aligned' ] ,
23
23
// Enforce or disallow spaces inside of curly braces in JSX attributes
24
24
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
25
- 'react/jsx-curly-spacing' : 0 ,
25
+ 'react/jsx-curly-spacing' : [ 0 , 'never' , { 'allowMultiline' : true } ] ,
26
26
// Enforce event handler naming conventions in JSX
27
27
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
28
28
'react/jsx-handler-names' : [ 0 , {
@@ -43,7 +43,7 @@ module.exports = {
43
43
'react/jsx-no-bind' : 2 ,
44
44
// Prevent duplicate props in JSX
45
45
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
46
- 'react/jsx-no-duplicate-props' : 0 ,
46
+ 'react/jsx-no-duplicate-props' : [ 0 , { 'ignoreCase' : false } ] ,
47
47
// Prevent usage of unwrapped JSX strings
48
48
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
49
49
'react/jsx-no-literals' : 0 ,
@@ -55,13 +55,19 @@ module.exports = {
55
55
'react/jsx-pascal-case' : 0 ,
56
56
// Enforce propTypes declarations alphabetical sorting
57
57
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-prop-types.md
58
- 'react/jsx-sort-prop-types' : 0 ,
58
+ 'react/jsx-sort-prop-types' : [ 0 , {
59
+ 'ignoreCase' : false ,
60
+ 'callbacksLast' : false ,
61
+ } ] ,
59
62
// Enforce props alphabetical sorting
60
63
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
61
- 'react/jsx-sort-props' : 0 ,
64
+ 'react/jsx-sort-props' : [ 0 , {
65
+ 'ignoreCase' : false ,
66
+ 'callbacksLast' : false ,
67
+ } ] ,
62
68
// Prevent React to be incorrectly marked as unused
63
69
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
64
- 'react/jsx-uses-react' : 2 ,
70
+ 'react/jsx-uses-react' : [ 2 , { 'pragma' : 'React' } ] ,
65
71
// Prevent variables used in JSX to be incorrectly marked as unused
66
72
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
67
73
'react/jsx-uses-vars' : 2 ,
@@ -85,7 +91,7 @@ module.exports = {
85
91
'react/no-is-mounted' : 2 ,
86
92
// Prevent multiple component definition per file
87
93
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
88
- 'react/no-multi-comp' : 2 ,
94
+ 'react/no-multi-comp' : [ 2 , { 'ignoreStateless' : false } ] ,
89
95
// Prevent usage of setState
90
96
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md
91
97
'react/no-set-state' : 0 ,
@@ -100,13 +106,13 @@ module.exports = {
100
106
'react/prefer-es6-class' : [ 2 , 'always' ] ,
101
107
// Prevent missing props validation in a React component definition
102
108
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
103
- 'react/prop-types' : 2 ,
109
+ 'react/prop-types' : [ 2 , { 'ignore' : [ ] , customValidators : [ ] } ] ,
104
110
// Prevent missing React when using JSX
105
111
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md
106
112
'react/react-in-jsx-scope' : 2 ,
107
113
// Restrict file extensions that may be required
108
114
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-extension.md
109
- 'react/require-extension' : 0 ,
115
+ 'react/require-extension' : [ 0 , { 'extensions' : [ '.jsx' ] } ] ,
110
116
// Prevent extra closing tags for components without children
111
117
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
112
118
'react/self-closing-comp' : 2 ,
0 commit comments