-
Notifications
You must be signed in to change notification settings - Fork 43
/
.eslintrc.js
50 lines (50 loc) · 1.27 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
module.exports = {
root: true,
parser: "babel-eslint",
extends: [
"@react-native-community",
"plugin:react/recommended",
"plugin:react-native/all",
"standard",
"prettier",
],
plugins: ["jest", "react-hooks", "prettier", "simple-import-sort", "import"],
rules: {
"simple-import-sort/exports": "error",
"simple-import-sort/imports": [
"warn",
{
groups: [
[
// Packages. `react` related packages come first.
"^react$",
"^prop-types$",
"^react-native$",
"^react-native",
// Others libs
"^[A-Za-z0-9]",
"^",
],
// Relative imports
[
// Side effect imports.
"^\\u0000",
// Parent imports. Put `..` last.
"^\\.\\.(?!/?$)",
"^\\.\\./?$",
// Other relative imports. Put same-folder imports and `.` last.
"^\\./(?=.*/)(?!/?$)",
"^\\.(?!/?$)",
"^\\./?$",
],
],
},
],
"import/first": "warn",
"import/newline-after-import": "warn",
"import/no-duplicates": "warn",
"react-native/no-raw-text": 0,
"react-native/no-inline-styles": 0,
"react/prop-types": 0,
},
};