-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
49 lines (49 loc) · 1.3 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
/* eslint-env node */
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'unicorn', 'no-only-tests', 'import'],
rules: {
'no-restricted-syntax': [
'error',
{
selector: 'TSEnumDeclaration',
message: "Don't declare enums",
},
],
'import/no-duplicates': ['error'],
'@typescript-eslint/no-misused-promises': [
'error',
{ checksVoidReturn: { attributes: false } },
],
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/consistent-type-imports': [
'error',
{
fixStyle: 'separate-type-imports',
},
],
'no-only-tests/no-only-tests': 'error',
'unicorn/filename-case': [
'error',
{
case: 'kebabCase',
},
],
'unicorn/no-empty-file': 'error',
'unicorn/no-instanceof-array': 'error',
'unicorn/prefer-includes': 'error',
'unicorn/prefer-object-from-entries': 'error',
'unicorn/prefer-string-slice': 'error',
},
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
root: true,
}