11module . exports = {
2- extends : [
3- 'eslint-config-airbnb/rules/react' ,
4- ] . map ( require . resolve ) ,
2+ extends : [ 'eslint-config-airbnb/rules/react' ] . map ( require . resolve ) ,
53 rules : {
64 // This rule allows you to enforce curly braces or disallow unnecessary curly braces
75 // in JSX props and/or children
@@ -10,7 +8,7 @@ module.exports = {
108
119 // Prevent missing displayName in a React component definition
1210 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
13- " react/display-name" : [ " warn" , { " ignoreTranspilerName" : true } ] ,
11+ ' react/display-name' : [ ' warn' , { ignoreTranspilerName : true } ] ,
1412
1513 // PropTypes improve the reusability of your component by validating the received data
1614 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
@@ -27,17 +25,20 @@ module.exports = {
2725 // Restrict file extensions that may contain JSX
2826 // JSX belongs to .js files.
2927 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
30- " react/jsx-filename-extension" : [ 'error' , { " extensions" : [ " .js" , " .jsx" ] } ] ,
28+ ' react/jsx-filename-extension' : [ 'error' , { extensions : [ ' .js' , ' .jsx' ] } ] ,
3129
3230 // Disallow JSX props spreading
3331 // Used inside HOC, that is fine.
3432 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
35- "react/jsx-props-no-spreading" : [ 'warn' , {
36- html : 'enforce' ,
37- custom : 'enforce' ,
38- explicitSpread : 'ignore' ,
39- exceptions : [ ] ,
40- } ] ,
33+ 'react/jsx-props-no-spreading' : [
34+ 'warn' ,
35+ {
36+ html : 'enforce' ,
37+ custom : 'enforce' ,
38+ explicitSpread : 'ignore' ,
39+ exceptions : [ ] ,
40+ } ,
41+ ] ,
4142
4243 // Enforce consistent usage of destructuring assignment of props, state, and context
4344 'react/destructuring-assignment' : [
@@ -83,14 +84,17 @@ module.exports = {
8384
8485 // Prevent missing parentheses around multilines JSX
8586 // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md
86- 'react/jsx-wrap-multilines' : [ 'warn' , {
87- declaration : 'parens-new-line' ,
88- assignment : 'parens-new-line' ,
89- return : 'parens-new-line' ,
90- arrow : 'parens-new-line' ,
91- condition : 'parens-new-line' ,
92- logical : 'parens-new-line' ,
93- prop : 'parens-new-line' ,
94- } ] ,
95- }
87+ 'react/jsx-wrap-multilines' : [
88+ 'warn' ,
89+ {
90+ declaration : 'parens-new-line' ,
91+ assignment : 'parens-new-line' ,
92+ return : 'parens-new-line' ,
93+ arrow : 'parens-new-line' ,
94+ condition : 'parens-new-line' ,
95+ logical : 'parens-new-line' ,
96+ prop : 'parens-new-line' ,
97+ } ,
98+ ] ,
99+ } ,
96100} ;
0 commit comments