forked from BlueWallet/BlueWallet
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc
79 lines (77 loc) · 2.51 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
72
73
74
75
76
77
78
79
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"react-native", // for no-inline-styles rule
"prettier"
],
"extends": [
"standard",
"standard-react",
"standard-jsx",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"@react-native",
"plugin:prettier/recommended" // removes all eslint rules that can mess up with prettier
],
"rules": {
"react/jsx-handler-names": "off", // activated by standard-react config
"react/display-name": "off",
"react-native/no-inline-styles": "error",
"react-native/no-unused-styles": "error",
"react-native/no-single-element-style-arrays": "error",
"prettier/prettier": [
"warn",
{
"singleQuote": true,
"printWidth": 140,
"trailingComma": "all",
"arrowParens": "avoid"
}
],
"@typescript-eslint/no-empty-function": "off", // used often in the codebase, useful e.g. in testing
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description",
"ts-ignore": "allow-with-description", // temporary allow to ease the migration
"ts-nocheck": true,
"ts-check": false
}
],
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
// disable rules that are superseded by @typescript-eslint rules
"no-unused-vars": "off",
"no-use-before-define": "off",
// disable rules that we want to enforce only for typescript files
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-use-before-define": "off"
},
"overrides": [
{
// enable the rule specifically for TypeScript files
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-use-before-define": ["error", { "variables": false }]
}
}
],
"env": {
"es6": true
},
"globals": { "fetch": false },
"settings": {
"react": {
// this is for eslint-plugin-react
"version": "detect" // React version. "detect" automatically picks the version you have installed.
}
}
}