-
Notifications
You must be signed in to change notification settings - Fork 1
/
react.js
32 lines (30 loc) · 1.2 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
const react = require('eslint-plugin-react')
const reactHooks = require('eslint-plugin-react-hooks')
module.exports = {
languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } },
name: '@cdoublev/eslint-config/react',
plugins: { react, 'react-hooks': { rules: reactHooks.rules } },
rules: {
'@stylistic/js/jsx-quotes': ['warn', 'prefer-single'],
'react/default-props-match-prop-types': 'warn',
'react/display-name': 'warn',
'react/jsx-child-element-spacing': 'warn',
'react/jsx-curly-brace-presence': 'warn',
'react/jsx-curly-newline': 'warn',
'react/jsx-curly-spacing': 'warn',
'react/jsx-equals-spacing': 'warn',
'react/jsx-first-prop-new-line': 'warn',
'react/jsx-no-comment-textnodes': 'warn',
'react/jsx-uses-vars': 'warn',
'react/no-unknown-property': 'warn',
'react/no-unused-prop-types': 'warn',
'react/require-default-props': 'warn',
'react/sort-default-props': 'warn',
'react/sort-prop-types': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'warn',
},
settings: {
react: { version: 'detect' },
},
}