1 | 'use strict';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | module.exports = {
|
9 | plugins: [
|
10 | 'react',
|
11 | ],
|
12 |
|
13 | ecmaFeatures: {
|
14 | jsx: true,
|
15 | },
|
16 |
|
17 | parserOptions: {
|
18 | ecmaFeatures: {
|
19 | jsx: true,
|
20 | },
|
21 | },
|
22 |
|
23 | rules: {
|
24 |
|
25 | 'react/jsx-equals-spacing': ['warn', 'never'],
|
26 | 'react/jsx-handler-names': ['warn', {
|
27 | 'eventHandlerPrefix': 'handle',
|
28 | 'eventHandlerPropPrefix': 'on'
|
29 | }],
|
30 | 'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
|
31 | 'react/jsx-no-undef': 'error',
|
32 | 'react/jsx-pascal-case': [
|
33 | 'warn',
|
34 | {
|
35 | allowAllCaps: true,
|
36 | ignore: [],
|
37 | },
|
38 | ],
|
39 |
|
40 |
|
41 | 'react/jsx-no-bind': ['error', {
|
42 | ignoreRefs: true,
|
43 | allowArrowFunctions: true,
|
44 | allowBind: false,
|
45 | }],
|
46 | 'react/jsx-no-comment-textnodes': 'error',
|
47 | 'react/jsx-uses-react': 'warn',
|
48 | 'react/jsx-uses-vars': 'warn',
|
49 | 'react/no-children-prop': 'warn',
|
50 | 'react/no-danger-with-children': 'error',
|
51 | 'react/no-deprecated': 'warn',
|
52 | 'react/no-did-mount-set-state': 'warn',
|
53 | 'react/no-did-update-set-state': 'warn',
|
54 | 'react/no-direct-mutation-state': 'error',
|
55 | 'react/no-is-mounted': 'warn',
|
56 | 'react/no-string-refs': 'warn',
|
57 | 'react/no-unknown-property': 'warn',
|
58 | 'react/no-will-update-set-state': 'warn',
|
59 | 'react/react-in-jsx-scope': 'error',
|
60 | 'react/require-render-return': 'error',
|
61 | 'react/sort-comp': 'warn',
|
62 | 'react/style-prop-object': 'warn',
|
63 | 'react/void-dom-elements-no-children': 'off',
|
64 | },
|
65 | }; |
\ | No newline at end of file |