-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
77 lines (77 loc) · 1.81 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
module.exports = {
extends: ['plugin:@typescript-eslint/recommended', 'plugin:import/typescript', 'plugin:react-hooks/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier', 'import'],
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/camelcase': 0,
'import/order': [
'error',
{
'newlines-between': 'always-and-inside-groups',
alphabetize: {
order: 'asc',
},
groups: ['builtin', 'external', 'internal', ['parent', 'index', 'sibling']],
},
],
'padding-line-between-statements': [
'error',
// IMPORT
{
blankLine: 'always',
prev: 'import',
next: '*',
},
{
blankLine: 'any',
prev: 'import',
next: 'import',
},
// EXPORT
{
blankLine: 'always',
prev: '*',
next: 'export',
},
{
blankLine: 'any',
prev: 'export',
next: 'export',
},
{
blankLine: 'always',
prev: '*',
next: ['const', 'let'],
},
{
blankLine: 'any',
prev: ['const', 'let'],
next: ['const', 'let'],
},
// BLOCKS
{
blankLine: 'always',
prev: ['block', 'block-like', 'class', 'function', 'multiline-expression'],
next: '*',
},
{
blankLine: 'always',
prev: '*',
next: ['block', 'block-like', 'class', 'function', 'return', 'multiline-expression'],
},
],
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
};