Update eslintrc
use react/sort-comp rule in eslintrc (thanks to planet-v3)
This commit is contained in:
parent
90e2a4014f
commit
f61b0cec4f
1 changed files with 12 additions and 2 deletions
14
.eslintrc
14
.eslintrc
|
|
@ -58,9 +58,19 @@
|
|||
"global-require": [0],
|
||||
// React
|
||||
//"computed-property-spacing": ["warn", "never"], // disallow spaces inside computed properties
|
||||
"react/jsx-indent-props": ["warn", 4],
|
||||
"react/jsx-indent-props": ["warn", 2],
|
||||
"react/forbid-prop-types": [0],
|
||||
"react/no-unescaped-entities": [0],
|
||||
"react/no-unused-prop-types": [0] # because broken
|
||||
"react/no-unused-prop-types": [0], # because broken
|
||||
"react/sort-comp": [1, {
|
||||
order: [
|
||||
'static-methods',
|
||||
'lifecycle',
|
||||
'/^on.+$/',
|
||||
'everything-else',
|
||||
'/^render.+$/',
|
||||
'render'
|
||||
]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue