UNPKG

2.23 kBJavaScriptView Raw
1module.exports = {
2 rules: {
3 'react/display-name': [2],
4 'react/forbid-prop-types': [2],
5 'react/no-children-prop': [2],
6 'react/no-danger': [2],
7 'react/no-danger-with-children': [2],
8 'react/no-deprecated': [2],
9 'react/no-did-mount-set-state': [2],
10 'react/no-did-update-set-state': [2],
11 'react/no-direct-mutation-state': [2],
12 'react/no-find-dom-node': [2],
13 'react/no-is-mounted': [2],
14 'react/no-multi-comp': [2, {
15 ignoreStateless: true
16 }],
17 'react/no-render-return-value': [2],
18 'react/no-set-state': [0],
19 'react/no-string-refs': [2],
20 'react/no-unescaped-entities': [2],
21 'react/no-unknown-property': [2],
22 'react/no-unused-prop-types': [2],
23 'react/prefer-es6-class': [2],
24 'react/prefer-stateless-function': [2],
25 'react/prop-types': [2],
26 'react/react-in-jsx-scope': [2],
27 'react/require-optimization': [0],
28 'react/require-render-return': [2],
29 'react/self-closing-comp': [2],
30 'react/sort-comp': [2],
31 'react/style-prop-object': [2],
32
33 // JSX
34 'react/jsx-boolean-value': [2, 'never'],
35 'react/jsx-closing-bracket-location': [2, 'line-aligned'],
36 'react/jsx-curly-spacing': [2],
37 'react/jsx-equals-spacing': [2],
38 'react/jsx-filename-extension': [2],
39 'react/jsx-first-prop-new-line': [2, 'multiline'],
40 'react/jsx-handler-names': [2],
41 'react/jsx-indent': [2],
42 'react/jsx-indent-props': [2],
43 'react/jsx-key': [2],
44 'react/jsx-max-props-per-line': [2, {maximum: 1}],
45 'react/jsx-no-bind': [2, {
46 ignoreRefs: true
47 }],
48 'react/jsx-no-comment-textnodes': [2],
49 'react/jsx-no-duplicate-props': [2],
50 'react/jsx-no-target-blank': [2],
51 'react/jsx-no-undef': [2],
52 'react/jsx-pascal-case': [2, {
53 allowAllCaps: true
54 }],
55 'react/jsx-tag-spacing': [2],
56 'react/jsx-uses-react': [2],
57 'react/jsx-uses-vars': [2],
58 'react/jsx-wrap-multilines': [2]
59 },
60 plugins: ['react'],
61 extends: ['plugin:react/recommended']
62};