forked from OpenDTU-App/opendtu-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
142 lines (142 loc) · 3.37 KB
/
.eslintrc.json
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
"env": {
"node": true,
"react-native/react-native": true
},
"overrides": [
{
// Test files only
"files": ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
"extends": ["plugin:testing-library/react"]
}
],
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:react-hooks/recommended"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": true,
"node": true
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"@typescript-eslint",
"no-relative-import-paths",
"react",
"react-native",
"react-hooks",
"prettier",
"import",
"simple-import-sort"
],
"rules": {
"import/no-named-as-default-member": "off",
"import/no-named-as-default": "off",
"import/first": "error",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/extensions": [
"error",
"never",
{
"json": "always"
}
],
"no-relative-import-paths/no-relative-import-paths": [
"warn",
{ "allowSameFolder": true, "rootDir": "src" }
],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react-native/no-unused-styles": 2,
"react/jsx-closing-bracket-location": ["warn", "tag-aligned"],
"react/jsx-closing-tag-location": ["warn", "tag-aligned"],
"react/jsx-curly-brace-presence": [
"warn",
{
"props": "never",
"children": "never"
}
],
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": ["error"],
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "separate-type-imports",
"disallowTypeAnnotations": true
}
],
"no-console": 0,
"indent": "off",
"quotes": [
"error",
"single",
{ "avoidEscape": true, "allowTemplateLiterals": true }
],
"@typescript-eslint/quotes": "off",
"semi": [
"error",
"always"
],
"comma-dangle": [
"error",
{
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline",
"functions": "only-multiline"
}
],
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"jsxSingleQuote": false,
"bracketSpacing": true,
"arrowParens": "avoid",
"bracketSameLine": false,
"endOfLine": "lf"
}
],
"simple-import-sort/imports": ["error", {
"groups": [
["^react"],
["^react-native$"],
["^\\w"],
["^@/slices"],
["^@/types"],
["^@/components"],
["^@/hooks"],
["^@/utils"],
["^@/assets"],
["^@/"],
["^[./]"]
]
}],
"simple-import-sort/exports": "error"
}
}