-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
129 lines (129 loc) · 3.93 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
{
"parser": "@typescript-eslint/parser",
"env": {
"es6": true
},
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"react",
"react-native",
"import",
"react-hooks",
"@typescript-eslint"
],
"extends": [
"@react-native-community",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:jsx-a11y/recommended", // accessibility
"plugin:prettier/recommended"
],
"ignorePatterns": ["dist/", "node_modules/"],
"rules": {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"no-console": "error",
"block-scoped-var": "error",
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"default-param-last": ["error"],
"dot-notation": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"max-classes-per-file": "error",
"no-alert": "error",
"no-caller": "error",
"no-else-return": "error",
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-throw-literal": "error",
"no-useless-concat": "error",
"radix": ["error", "as-needed"],
"require-await": "error",
"yoda": "error",
"no-shadow": "off",
"prefer-destructuring": ["error", { "array": false, "object": true }],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "import", "next": "export" },
{ "blankLine": "always", "prev": "export", "next": "export" },
{ "blankLine": "always", "prev": "*", "next": "return" }
],
"react/jsx-filename-extension": ["warn", { "extensions": [".ts", ".tsx"] }],
"react/destructuring-assignment": ["error", "always"],
"react/no-array-index-key": ["warn"],
"react/jsx-closing-bracket-location": ["error"],
"react/jsx-closing-tag-location": ["error"],
"react/jsx-no-useless-fragment": ["error"],
"react/jsx-props-no-spreading": ["warn"],
"react/jsx-sort-props": ["warn", { "callbacksLast": true }],
"react/jsx-tag-spacing": ["warn"],
"react/jsx-boolean-value": ["error", "never"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/array-type": ["error", { "default": "array" }],
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/naming-convention": [
"error",
{ "selector": "interface", "prefix": ["I"], "format": ["StrictPascalCase"] }
],
"@typescript-eslint/explicit-module-boundary-types": 0
},
"overrides": [
{
"files": ["*.test.tsx", "src/typing/**"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
},
{
"files": ["*.test.tsx", "src/common/**"],
"rules": {
"react/jsx-props-no-spreading": ["off"]
}
},
{
"files": ["*.config.js"],
"rules": {
"@typescript-eslint/no-var-requires": ["off"]
}
}
],
"settings": {
"import/ignore": ["react-native"],
"react" : {
"version": "detect"
},
"import/resolver": {
"typescript": {
},
"node": {
"extensions": [".ts", ".tsx", ".js", ".json", ".android.js", ".ios.js"]
},
"jest": {
"jestConfigFile": "./jest.config.js"
}
}
}
}