@@ -89,6 +89,7 @@ module.exports = {
8989 'react/sort-prop-types' : [ 0 , {
9090 ignoreCase : false ,
9191 callbacksLast : false ,
92+ requiredFirst : false ,
9293 } ] ,
9394
9495 // Deprecated in favor of react/jsx-sort-props
@@ -99,11 +100,13 @@ module.exports = {
99100 'react/jsx-sort-props' : [ 0 , {
100101 ignoreCase : false ,
101102 callbacksLast : false ,
103+ shorthandFirst : false ,
104+ shorthandLast : false ,
102105 } ] ,
103106
104107 // Prevent React to be incorrectly marked as unused
105108 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
106- 'react/jsx-uses-react' : [ 2 , { pragma : 'React' } ] ,
109+ 'react/jsx-uses-react' : [ 2 ] ,
107110
108111 // Prevent variables used in JSX to be incorrectly marked as unused
109112 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
@@ -115,15 +118,15 @@ module.exports = {
115118
116119 // Prevent usage of deprecated methods
117120 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
118- 'react/no-deprecated' : [ 1 , { react : '0.14.0' } ] ,
121+ 'react/no-deprecated' : [ 1 ] ,
119122
120123 // Prevent usage of setState in componentDidMount
121124 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
122- 'react/no-did-mount-set-state' : [ 2 , 'allow-in-func' ] ,
125+ 'react/no-did-mount-set-state' : [ 2 ] ,
123126
124127 // Prevent usage of setState in componentDidUpdate
125128 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
126- 'react/no-did-update-set-state' : [ 2 , 'allow-in-func' ] ,
129+ 'react/no-did-update-set-state' : [ 2 ] ,
127130
128131 // Prevent direct mutation of this.state
129132 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
@@ -167,7 +170,7 @@ module.exports = {
167170
168171 // Restrict file extensions that may be required
169172 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-extension.md
170- 'react/require-extension' : [ 0 , { extensions : [ '.jsx' ] } ] ,
173+ 'react/require-extension' : [ 0 , { extensions : [ '.jsx' , '.js' ] } ] ,
171174
172175 // Require render() methods to return something
173176 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
@@ -196,12 +199,13 @@ module.exports = {
196199 } ] ,
197200
198201 // Prevent missing parentheses around multilines JSX
199- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/wrap-multilines.md
200- 'react/wrap-multilines' : [ 2 , {
202+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx- wrap-multilines.md
203+ 'react/jsx- wrap-multilines' : [ 2 , {
201204 declaration : true ,
202205 assignment : true ,
203206 return : true
204207 } ] ,
208+ 'react/wrap-multilines' : 0 , // deprecated version
205209
206210 // Require that the first prop in a JSX element be on a new line when the element is multiline
207211 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md
@@ -218,7 +222,32 @@ module.exports = {
218222 // Disallow target="_blank" on links
219223 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
220224 // TODO: enable
221- 'react/jsx-no-target-blank' : 0
225+ 'react/jsx-no-target-blank' : 0 ,
226+
227+ // only .jsx files may have JSX
228+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
229+ // TODO: enable
230+ 'react/jsx-filename-extension' : [ 0 , { extensions : [ '.jsx' ] } ] ,
231+
232+ // prevent accidental JS comments from being injected into JSX as text
233+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
234+ // TODO: enable
235+ 'react/jsx-no-comment-textnodes' : 0 ,
236+ 'react/no-comment-textnodes' : 0 , // deprecated version
237+
238+ // disallow using React.render/ReactDOM.render's return value
239+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
240+ // TODO: enable
241+ 'react/no-render-return-value' : 0 ,
242+
243+ // require a shouldComponentUpdate method, or PureRenderMixin
244+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md
245+ 'react/require-optimization' : [ 0 , { allowDecorators : [ ] } ] ,
246+
247+ // warn against using findDOMNode()
248+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
249+ // TODO: enable
250+ 'react/no-find-dom-node' : 0 ,
222251 } ,
223252
224253 settings : {
0 commit comments