forked from DestinyItemManager/DIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
127 lines (127 loc) · 4.16 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
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
{
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"es6": true,
"serviceworker": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/react",
"prettier/@typescript-eslint"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"$featureFlags": "readonly",
"ga": true,
"$DIM_FLAVOR": "readonly",
"$DIM_VERSION": "readonly",
"$DIM_BUILD_DATE": "readonly",
"$GOOGLE_DRIVE_CLIENT_ID": "readonly",
"$DIM_WEB_API_KEY": "readonly",
"$DIM_WEB_CLIENT_ID": "readonly",
"$DIM_WEB_CLIENT_SECRET": "readonly",
"$DIM_API_KEY": "readonly",
"$BROWSERS": "readonly",
"workbox": true,
"React": true,
"require": true,
"module": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"settings": {
"react": {
"version": "detect"
}
},
"plugins": ["react", "react-hooks", "@typescript-eslint", "lodash"],
"rules": {
"no-console": "off",
"no-empty": "off",
"no-implicit-coercion": "error",
"no-restricted-properties": [
1,
{
"object": "_",
"property": "forEach",
"message": "Please use a for in loop."
},
{
"object": "_",
"property": "filter",
"message": "Please use the native js filter."
}
],
"arrow-body-style": ["error", "as-needed"],
"no-return-await": "error",
"prefer-regex-literals": "error",
"prefer-promise-reject-errors": "error",
"require-atomic-updates": "off",
"react/no-unescaped-entities": "off",
"react/jsx-no-target-blank": "off",
"react/display-name": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prefer-stateless-function": "warn",
"react/no-access-state-in-setstate": "error",
"react/no-this-in-sfc": "error",
"react/no-unused-state": "error",
"lodash/collection-method-value": "error",
"lodash/collection-return": "error",
"lodash/no-extra-args": "error",
"lodash/chaining": ["error", "never"],
"lodash/identity-shorthand": ["error", "never"],
"lodash/matches-shorthand": ["error", "never"],
"lodash/matches-prop-shorthand": ["error", "never"],
"lodash/prop-shorthand": ["error", "never"],
"lodash/prefer-compact": "error",
"lodash/prefer-filter": "error",
"lodash/prefer-find": "error",
"lodash/prefer-flat-map": "error",
"lodash/prefer-immutable-method": "error",
"lodash/prefer-map": "error",
"lodash/prefer-reject": "error",
"lodash/prefer-times": "error",
"lodash/preferred-alias": "error",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": ["error", { "functions": false }],
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "(^_|[iI]gnored)",
"argsIgnorePattern": "(^_|[iI]gnored)",
"ignoreRestSiblings": true
}
]
}
}