-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
71 lines (71 loc) · 1.96 KB
/
.eslintrc
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
{
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest/globals": true,
"react-native/react-native": true
},
"extends": ["plugin:react-native/all", "eslint:recommended", "plugin:react-perf/recommended", "plugin:react-hooks/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "react-native", "@typescript-eslint", "prettier", "jest", "import"],
"rules": {
// Base Rules
"max-len": ["error", {"code": 160, "ignoreComments": true, "ignoreStrings": true}],
"no-console": 1,
"quotes": ["error", "double"],
"semi": ["error", "always"],
"object-curly-spacing": ["error", "always"],
// Prettier
"prettier/prettier": ["error", { "endOfLine": "auto" }],
// Jest
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
// React
"react/function-component-definition": [2, { "namedComponents": "arrow-function", "unnamedComponents": "arrow-function" }],
"react/react-in-jsx-scope": "off",
// Import
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", ["parent", "sibling", "index"]],
"pathGroups": [
{
"pattern": "react*",
"group": "builtin",
"position": "before"
},
{
"pattern": "react-native",
"group": "builtin",
"position": "before"
},
{
"pattern": "assets/**/*",
"group": "index",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
// Conflicting Rules
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
// React Native
"react-native/no-raw-text": "off"
// React Hooks
}
}