-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact.js
34 lines (34 loc) · 1.13 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
module.exports = {
extends: [
'eslint-config-airbnb-typescript',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'./base.js',
],
plugins: ['@studysync/persnickety'],
settings: {
react: {
version: '16.2',
},
},
rules: {
'react/jsx-first-prop-new-line': ['error', 'multiline'],
'react/jsx-max-props-per-line': ['error', { maximum: 1, when: 'always' }],
'react/jsx-indent': ['error', 2, { checkAttributes: true, indentLogicalExpressions: true }],
'react/jsx-curly-spacing': ['error', 'never'],
'react/jsx-fragments': ['error', 'element'],
'react/jsx-key': 'error',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'react/no-array-index-key': 'off',
'react/no-unused-prop-types': 'off', // Too many false positives
'react/destructuring-assignment': 'off',
'react/require-default-props': 'off',
'@studysync/persnickety/jsx-child-location': 'error',
'react/jsx-curly-brace-presence': [
'error',
{ props: 'never', children: 'never', propElementValues: 'always' },
],
},
};