-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
60 lines (59 loc) · 2.02 KB
/
index.js
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
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'import',
'react',
'react-native',
'react-hooks',
'jest',
],
rules: {
'no-eval': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'import/no-relative-packages': 'error',
'no-console': 'error',
'no-constant-condition': ['error', { checkLoops: false }],
'no-inner-declarations': ['error', 'functions'],
'no-restricted-syntax': ['error', 'ForInStatement'],
'void-zero': 'off',
'max-classes-per-file': ['error', 2],
'react-native/no-unused-styles': 'error',
semi: 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/semi': 'off',
'react-hooks/rules-of-hooks': 'error',
'@typescript-eslint/no-misused-promises': [
'error',
{ checksVoidReturn: false },
],
'@typescript-eslint/no-floating-promises': 'error',
'jest/expect-expect': ['error', { assertFunctionNames: ['expect*'] }],
'jest/no-commented-out-tests': 'error',
'jest/no-disabled-tests': 'error',
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['**/*.test.ts', '**/*.spec.ts', '**/e2e/**/*.ts'] },
],
// Disable rules pulled in by "recommended" above that we're failing. It could make
// sense to work towards enabling these.
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'no-fallthrough': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'no-case-declarations': 'off',
'no-useless-catch': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
}