forked from software-mansion/react-native-screens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
92 lines (85 loc) · 2.63 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
module.exports = {
parser: 'babel-eslint',
extends: [
'standard',
'prettier',
'prettier/flowtype',
'prettier/react',
'prettier/standard',
],
plugins: ['react', 'react-native', 'import', 'jest'],
settings: {
'import/core-modules': ['react-native-screens'],
},
env: {
'react-native/react-native': true,
'jest/globals': true,
},
rules: {
'import/no-unresolved': 2,
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2,
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
settings: {
'import/extensions': ['.js', '.ts', '.tsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.tsx'],
},
},
},
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/consistent-type-assertions': [
'error',
{ assertionStyle: 'as' },
],
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-empty-interface': [
'error',
{ allowSingleExtends: true },
],
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
classes: false,
variables: false,
typedefs: false,
},
],
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unified-signatures': 'error',
'default-case': 'off',
'no-dupe-class-members': 'off',
'no-unused-vars': 'off',
'no-array-constructor': 'off',
'no-use-before-define': 'off',
},
},
],
};