This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
react.js
66 lines (60 loc) · 1.67 KB
/
react.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
'use strict'
const { warn, off, error, any } = require('./constants')
module.exports = {
extends: [
'@appliedblockchain/eslint-config',
'plugin:react/recommended'
],
parser: 'babel-eslint',
plugins: [
'react'
],
rules: {
'jsx-quotes': [ error, 'prefer-double' ],
'react/forbid-prop-types': [ error, { forbid: [ any ] } ],
'no-multiple-empty-lines': [ error, { max: 1 } ],
'react/jsx-boolean-value': [ off ],
'react/jsx-indent': [ warn, 2 ],
'react/jsx-indent-props': [ warn, 2 ],
'react/jsx-pascal-case': error,
'react/jsx-tag-spacing': [ error, { 'beforeSelfClosing': 'always' } ],
'react/sort-comp': [ error, {
order: [
'static-methods',
'lifecycle',
'everything-else',
'render'
],
groups: {
lifecycle: [
'displayName',
'propTypes',
'props',
'contextTypes',
'childContextTypes',
'mixins',
'statics',
'defaultProps',
'state',
'constructor',
'getDefaultProps',
'getInitialState',
'state',
'getChildContext',
'componentWillMount',
'componentDidMount',
'componentWillReceiveProps',
'shouldComponentUpdate',
'componentWillUpdate',
'componentDidUpdate',
'componentWillUnmount'
]
}
} ],
'react/no-did-mount-set-state': error,
'react/no-did-update-set-state': error,
'react/no-unused-prop-types': warn,
'react/no-multi-comp': [ warn, { ignoreStateless: true } ],
'react/prefer-stateless-function': [ error, { ignorePureComponents: true } ]
}
}