-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreact.js
44 lines (43 loc) · 1.12 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
35
36
37
38
39
40
41
42
43
44
const {OFF, WARNING} = require('./constants');
module.exports = {
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
plugins: ['react', 'react-hooks'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
babelOptions: {
presets: ['@babel/preset-react'],
},
},
rules: {
'react/prop-types': WARNING,
'react/sort-comp': WARNING,
},
settings: {
react: {
version: 'detect',
},
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'react/prop-types': OFF,
'react/sort-comp': [
WARNING,
{
order: [
'static-variables',
'static-methods',
'instance-variables',
'lifecycle',
'render',
'everything-else',
],
},
],
},
},
],
};