forked from mukaihajime/dynamodbtoolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
81 lines (77 loc) · 1.97 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
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/typescript',
'plugin:unicorn/recommended',
'prettier',
],
overrides: [
{
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
files: ['*.test.ts'],
plugins: ['jest'],
rules: {
'jest/no-commented-out-tests': 'off',
},
},
{
files: ['index.ts','index.mock.ts'],
plugins: ['sort-exports'],
rules: {
"sort-exports/sort-exports": ["error", {"sortDir": "asc"}],
}
},
],
plugins: [
'jest',
'import',
'unused-imports',
'sort-keys-fix',
'sort-destructure-keys',
'typescript-sort-keys',
'testing-library',
'unicorn',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
},
],
'@typescript-eslint/no-unused-vars': 'error',
'import/no-cycle': 'error',
'import/no-relative-parent-imports': 'off',
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
},
groups: ['builtin', 'external', 'parent', 'sibling', 'index', 'object', 'type'],
'newlines-between': 'never',
},
],
'no-console': 'error',
// オブジェクトリターンのソート
'sort-destructure-keys/sort-destructure-keys': 'error',
'sort-keys-fix/sort-keys-fix': 'error',
// オブジェクト引数のソート
'typescript-sort-keys/interface': ['error', 'asc', { natural: true }],
'typescript-sort-keys/string-enum': ['error', 'asc', { natural: true }],
'unicorn/filename-case': 'off',
'unicorn/no-null': 'off',
'unicorn/prevent-abbreviations': 'off',
'unused-imports/no-unused-imports': 'error',
},
settings: {
'import/resolver': {
typescript: {
// alwaysTryTypes: true,
project: 'tsconfig.json',
},
},
},
}