-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
56 lines (55 loc) · 1.18 KB
/
Copy path.eslintrc.js
File metadata and controls
56 lines (55 loc) · 1.18 KB
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
52
53
54
55
56
const OFF = 0;
const WARN = 1;
const ERROR = 2;
module.exports = {
env: {
browser: true,
es2021: true,
jest: true,
'react-native/react-native': true,
},
settings: {
'import/resolver': {
'babel-module': {},
},
},
extends: [
'plugin:react/recommended',
'airbnb',
'airbnb/hooks',
'prettier',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:jsx-control-statements/recommended',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'react',
'react-native',
'react-hooks',
'jsx-control-statements',
'jest',
'import',
],
rules: {
'react/jsx-filename-extension': [WARN, {extensions: ['.js', '.jsx']}],
'react/function-component-definition': [
ERROR,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'comma-dangle': OFF,
'react/jsx-props-no-spreading': OFF,
'react/jsx-no-undef': [ERROR, {allowGlobals: true}],
'jsx-control-statements/jsx-for-require-body': OFF,
'no-plusplus': ['error', {allowForLoopAfterthoughts: true}],
},
};