1module.exports = {
2  parserOptions: { ecmaFeatures: { jsx: true } },
3  plugins: ['react', 'react-hooks'],
4  rules: {
5    'react/jsx-boolean-value': ['warn', 'never'],
6    'react/jsx-closing-bracket-location': [
7      'warn',
8      { nonEmpty: 'after-props', selfClosing: 'tag-aligned' },
9    ],
10    'react/jsx-curly-brace-presence': ['warn', 'never'],
11    'react/jsx-curly-spacing': ['warn', { when: 'never' }],
12    'react/jsx-equals-spacing': ['warn', 'never'],
13    'react/jsx-first-prop-new-line': ['warn', 'multiline'],
14    'react/jsx-fragments': ['warn', 'syntax'],
15    'react/jsx-indent': ['warn', 2],
16    'react/jsx-indent-props': ['warn', 2],
17    'react/jsx-no-bind': ['warn', { allowArrowFunctions: true, allowFunctions: true }],
18    'react/jsx-no-duplicate-props': 'error',
19    'react/jsx-no-undef': 'error',
20    'react/jsx-props-no-multi-spaces': 'warn',
21    'react/jsx-tag-spacing': 'warn',
22    'react/jsx-uses-react': 'warn',
23    'react/jsx-uses-vars': 'warn',
24    'react/jsx-wrap-multilines': [
25      'warn',
26      { declaration: false, assignment: false, return: true, arrow: true },
27    ],
28    'react/no-access-state-in-setstate': 'warn',
29    'react/no-did-mount-set-state': 'warn',
30    'react/no-did-update-set-state': 'warn',
31    'react/no-direct-mutation-state': 'warn',
32    'react/no-redundant-should-component-update': 'warn',
33    'react/no-this-in-sfc': 'warn',
34    'react/no-unknown-property': 'warn',
35    'react/no-will-update-set-state': 'warn',
36    'react/require-render-return': 'warn',
37    'react/self-closing-comp': 'warn',
38
39    'react-hooks/rules-of-hooks': 'error',
40    'react-hooks/exhaustive-deps': 'off',
41  },
42  settings: {
43    react: { version: 'detect' },
44  },
45};
46