|
1 | 1 | { |
2 | 2 | "parser": "babel-eslint", |
| 3 | + "plugins": [ |
| 4 | + "react" |
| 5 | + ], |
3 | 6 | "env": { |
4 | 7 | "browser": true, |
5 | 8 | "node": true |
|
164 | 167 | "space-before-function-paren": [2, "never"], // http://eslint.org/docs/rules/space-before-function-paren |
165 | 168 | "space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops |
166 | 169 | "space-return-throw-case": 2, // http://eslint.org/docs/rules/space-return-throw-case |
167 | | - "spaced-line-comment": 2 // http://eslint.org/docs/rules/spaced-line-comment |
| 170 | + "spaced-line-comment": 2, // http://eslint.org/docs/rules/spaced-line-comment |
| 171 | + |
| 172 | +/** |
| 173 | + * JSX style |
| 174 | + */ |
| 175 | + "react/display-name": 0, |
| 176 | + "react/jsx-boolean-value": 2, |
| 177 | + "react/jsx-quotes": [2, "double"], |
| 178 | + "react/jsx-no-undef": 2, |
| 179 | + "react/jsx-sort-props": 0, |
| 180 | + "react/jsx-sort-prop-types": 0, |
| 181 | + "react/jsx-uses-react": 2, |
| 182 | + "react/jsx-uses-vars": 2, |
| 183 | + "react/no-did-mount-set-state": [2, "allow-in-func"], |
| 184 | + "react/no-did-update-set-state": 2, |
| 185 | + "react/no-multi-comp": 2, |
| 186 | + "react/no-unknown-property": 2, |
| 187 | + "react/prop-types": 2, |
| 188 | + "react/react-in-jsx-scope": 2, |
| 189 | + "react/self-closing-comp": 2, |
| 190 | + "react/wrap-multilines": 2, |
| 191 | + "react/sort-comp": [2, { |
| 192 | + "order": [ |
| 193 | + "displayName", |
| 194 | + "mixins", |
| 195 | + "statics", |
| 196 | + "propTypes", |
| 197 | + "getDefaultProps", |
| 198 | + "getInitialState", |
| 199 | + "componentWillMount", |
| 200 | + "componentDidMount", |
| 201 | + "componentWillReceiveProps", |
| 202 | + "shouldComponentUpdate", |
| 203 | + "componentWillUpdate", |
| 204 | + "componentWillUnmount", |
| 205 | + "/^on.+$/", |
| 206 | + "/^get.+$/", |
| 207 | + "/^render.+$/", |
| 208 | + "render" |
| 209 | + ] |
| 210 | + }] |
168 | 211 | } |
169 | 212 | } |
0 commit comments