forked from microsoft/BotFramework-Composer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.react.js
51 lines (48 loc) · 1.13 KB
/
.eslintrc.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
45
46
47
48
49
50
51
module.exports = {
extends: ['./.eslintrc.js', 'plugin:react/recommended'],
plugins: ['react-hooks', 'format-message', 'emotion'],
settings: {
react: {
version: '16.9.0',
},
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
// format message
'format-message/literal-pattern': 'error',
'format-message/no-invalid-pattern': 'error',
'format-message/no-missing-params': ['error', { allowNonLiteral: false }],
// react hooks
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'error',
// react
'react/display-name': 'off',
'react/no-danger': 'error',
'react/no-deprecated': 'warn',
'react/prop-types': 'warn',
// emotion
'emotion/jsx-import': 'error',
},
overrides: [
{
files: ['**/*.+(ts|tsx)'],
rules: {
'react/prop-types': 'off',
},
},
{
files: ['**/*.+(test|spec).+(js|jsx|ts|tsx)'],
rules: {
'react/display-name': 'off',
'react/prop-types': 'off',
'react/no-danger': 'off',
},
},
],
};