-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
89 lines (87 loc) · 2.23 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
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: "./",
},
extends: [
"@react-native-community",
"prettier",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:jest/recommended",
],
plugins: ["@typescript-eslint", "prettier", "import"],
rules: {
complexity: ["error", 8],
"import/order": "off",
"import/extensions": 0,
"react/jsx-filename-extension": [
2,
{
extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"],
},
],
"import/no-unresolved": [
2,
{
"ignore": ["@env"]
}
],
"arrow-body-style": 0,
"import/prefer-default-export": 0,
"eslint-comments/no-unlimited-disable": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "_",
varsIgnorePattern: "_",
},
],
"react/jsx-key": [
"error",
{
checkFragmentShorthand: true,
},
],
"@typescript-eslint/ban-types": [
"error",
{
types: {
object: false,
Function: false,
"{}": false,
},
extendDefaults: true,
},
],
"jsx-a11y/anchor-is-valid": 0,
"@typescript-eslint/ban-ts-comment": [
"error",
{ "ts-ignore": "allow-with-description" },
],
"class-methods-use-this": 0,
"import/no-cycle": 0,
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"no-param-reassign": [2, { props: false }],
"react/require-default-props": "off",
"react/no-unused-prop-types": 0,
"import/no-extraneous-dependencies": 0
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
// Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
// use <root>/path/to/folder/tsconfig.json
"project": "./",
}
}
}
};