-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
95 lines (93 loc) · 2.01 KB
/
.eslintrc.cjs
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
const customHooks =
// @sorted
[
"useAnimatedProps",
"useAnimatedReaction",
"useAnimatedScrollHandler",
"useAnimatedStyle",
"useAsyncCallback",
"useAsyncCallbackBusyState",
"useAsyncInterval",
"useAsyncUpdater",
"useBooleanConfig",
"useDeferredCallback",
"useDeferredUpdater",
"useDelayedCallback",
"useDelayedUpdater",
"useDerivedValue",
"useEnumConfig",
"useInterval",
"useResource",
"useStateConfig",
"useUpdater"
];
/**
* @type {import("eslint").Linter.Config}
*/
const config = {
ignorePatterns: [
"!.*",
"/coverage/**",
"/dist/**",
"/es/**",
"/node_modules/**"
],
env: {
es2022: true
},
globals: {
facades: "readonly",
reactNativeMisc: "readonly"
},
extends: ["union", "union/react"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: { jsx: true },
ecmaVersion: 2022,
project: "tsconfig.json",
sourceType: "module"
},
rules: {
"@cspell/spellchecker": [
"warn",
{
cspell: {
words:
// @sorted
[
"asyncs",
"cjsx",
"firestore",
"mjsx",
"packagejson",
"pannable",
"prerendered",
"sonarjs",
"swipeable",
"worklets"
]
}
}
],
"@typescript-eslint/no-namespace": "off",
"etc/no-internal": "off",
"i18n-text/no-en": "off",
"import/export": "off",
"import/no-internal-modules": [
"warn",
{ allow: ["@expo/vector-icons/build/createIconSet"] }
],
"import/no-namespace": "off",
"no-magic-numbers": [
"warn",
{ ignore: [-1, 0, 0.5, 1, 2, 10, 12, 24, 60, 100, 1000] }
],
"no-type-assertion/no-type-assertion": "off",
"react-hooks/exhaustive-deps": [
"warn",
{ additionalHooks: `^(${customHooks.join("|")})$` }
],
"sonarjs/cognitive-complexity": "off"
}
};
module.exports = config;