-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
53 lines (48 loc) · 1.43 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
module.exports = {
root: true,
extends: [
'@react-native-community',
'prettier'
],
plugins: ['@typescript-eslint', 'unused-imports'],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'prettier/prettier': [
'error',
{
quoteProps: 'consistent',
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
},
],
//typescript rules
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-parameter-properties": "error",
// making this an error going forward
"@typescript-eslint/no-unused-vars": "error",
// import rules
"import/first": "error",
"import/newline-after-import": "error",
"import/no-cycle": "warn",
"import/no-useless-path-segments": "error",
//eslint
curly: "error",
eqeqeq: "error",
"no-implicit-coercion": ["error", { boolean: false }],
// has false positives
"no-shadow": "off",
// replaced with this
"@typescript-eslint/no-shadow": "error",
"no-unused-expressions": "error",
"no-useless-computed-key": "error",
},
},
],
};