-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
78 lines (78 loc) · 1.72 KB
/
.eslintrc.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
module.exports = {
env: {
es2021: true,
node: true,
jest: true,
'react-native/react-native': true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
overrides: [],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'react',
'react-native',
'@typescript-eslint',
'sort-destructure-keys',
],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 1,
'@typescript-eslint/no-unused-vars': ['error'],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-console': 1,
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
imports: 'always-multiline',
objects: 'always-multiline',
},
],
'import/prefer-default-export': 0,
'max-len': [
'error',
{
code: 80,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreTrailingComments: true,
ignoreUrls: true,
tabWidth: 2,
},
],
'max-params': [
'error',
{
max: 3,
},
],
'react/react-in-jsx-scope': 'off',
semi: ['error', 'never'],
'sort-destructure-keys/sort-destructure-keys': 2,
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
},
],
'sort-vars': ['error'],
'space-before-function-paren': [2, 'always'],
},
}