forked from sciety/sciety
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
117 lines (117 loc) · 3.28 KB
/
.eslintrc.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
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
module.exports = {
env: {
es2020: true,
node: true,
},
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:jest/all',
'plugin:jest-formatting/strict',
'plugin:fp-ts/all',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.dev.json',
},
plugins: [
'@typescript-eslint',
'jest',
'jest-formatting',
'node',
'no-loops',
'unused-imports',
],
root: true,
rules: {
'@typescript-eslint/array-type': ['error', {
default: 'generic',
}],
'@typescript-eslint/brace-style': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'comma',
requireLast: true,
},
singleline: {
delimiter: 'comma',
requireLast: false,
},
}],
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-implicit-any-catch': 'error',
'@typescript-eslint/no-misused-promises': ['error', {
checksVoidReturn: false,
}],
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'consistent-return': 'off',
'default-case': 'off',
'fp-ts/no-module-imports': 'off',
'import/no-useless-path-segments': ['error', {
noUselessIndex: true,
}],
'import/order': ['error', {
alphabetize: {
order: 'asc',
},
groups: [
'builtin',
'external',
'internal',
'index',
'sibling',
'parent',
],
}],
'import/prefer-default-export': 'off',
'jest/no-disabled-tests': 'off',
'jest/no-hooks': 'off',
'jest/prefer-expect-assertions': 'off',
'jest/unbound-method': 'off',
'max-len': ['error', 120, 2, {
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
}],
'no-await-in-loop': 'off',
'no-loops/no-loops': 2,
'no-restricted-syntax': ['error', ...[
'ForInStatement',
'LabeledStatement',
'WithStatement',
]],
'no-underscore-dangle': 'off',
'no-unreachable': 'error',
'no-void': ['error', {
allowAsStatement: true,
}],
'node/prefer-global/buffer': ['error', 'never'],
'node/prefer-global/text-decoder': ['error', 'never'],
'node/prefer-global/text-encoder': ['error', 'never'],
'node/prefer-global/url': ['error', 'never'],
'node/prefer-global/url-search-params': ['error', 'never'],
'sort-imports': ['error', {
ignoreCase: true,
ignoreDeclarationSort: true,
}],
'unused-imports/no-unused-imports-ts': 'error',
'import/no-extraneous-dependencies': ['error', { devDependencies: ['feature-test/**/*.ts', 'test/**/*.ts'] }],
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
};