-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
48 lines (46 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
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
'airbnb-base',
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['import', 'unused-imports'],
settings: {
'import/resolver': {
typescript: [],
},
// src/@types で上書きした型を持つパッケージがinternalとして認識され
// import/order でエラーとなってしまう現象を回避する
'import/external-module-folders': ['node_modules', 'src/@types'],
},
rules: {
// 未使用のインポートを削除する
'unused-imports/no-unused-imports': 'error',
// インポート順の指定
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: true },
'newlines-between': 'always',
},
],
// 空行を 1 行までとする
'no-multiple-empty-lines': ['error', { max: 1 }],
// default exportは強制しない
'import/prefer-default-export': 'off',
// void ステートメント許可
'no-void': ['error', { allowAsStatement: true }],
},
}