-
Notifications
You must be signed in to change notification settings - Fork 79
/
.eslintrc.js
69 lines (69 loc) · 1.78 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
module.exports = {
root: true,
extends: ['plugin:prettier/recommended', '@react-native'],
parser: '@typescript-eslint/parser',
plugins: ['react-native', 'prettier', '@typescript-eslint', 'unused-imports', 'simple-import-sort', 'import'],
env: {
'react-native/react-native': true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
settings: {
'react-native/style-sheet-object-names': ['ScaledSheet'],
},
rules: {
'react-native/no-unused-styles': 2,
'@typescript-eslint/no-unused-vars': 'off', // or "no-unused-vars": "off",
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': 0,
semi: ['warn', 'never'],
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: false,
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: true,
trailingComma: 'all',
printWidth: 120,
},
],
'comma-dangle': 0,
'simple-import-sort/imports': 'off',
'simple-import-sort/exports': 'error',
'import/order': [
'error',
{
pathGroups: [
{
pattern: 'react',
group: 'builtin',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['react'],
},
],
'import/first': 'error',
'import/newline-after-import': 'off',
'import/no-duplicates': 'error',
'react/display-name': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-shadow': ['error'],
'no-shadow': 'off',
'no-undef': 'off',
'react-hooks/exhaustive-deps': 'warn',
'react-native/no-unused-styles': 'warn',
},
},
],
}