forked from software-mansion/react-native-screens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
93 lines (87 loc) · 2.34 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
93
module.exports = {
extends: [
'standard',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:react/recommended',
'prettier',
'prettier/react',
'prettier/standard',
],
plugins: ['react-native'],
env: {
'react-native/react-native': true,
},
settings: {
'import/core-modules': ['react-native-screens'],
'import/ignore': ['node_modules/react-native/index\\.js$'],
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.native.js'],
},
},
react: {
version: 'detect',
},
},
rules: {
'react/prop-types': 'off',
},
overrides: [
{
files: ['*.{js,jsx}'],
parser: 'babel-eslint',
},
{
files: ['*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'prettier/@typescript-eslint',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
rules: {
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/consistent-type-assertions': [
'error',
{ assertionStyle: 'as' },
],
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-empty-interface': [
'error',
{ allowSingleExtends: true },
],
'@typescript-eslint/no-extraneous-class': '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-optional-chain': 'error',
'@typescript-eslint/unified-signatures': 'error',
'default-case': 'off',
'no-unused-vars': 'off',
'no-array-constructor': 'off',
'no-use-before-define': 'off',
},
},
],
};