-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
100 lines (100 loc) · 2.23 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
module.exports = {
env: {
browser: true,
jest: true,
node: true,
},
extends: [
'react-app',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'prettier/@typescript-eslint',
'prettier/react',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'prettier', 'react'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'import/newline-after-import': 'error',
'import/no-default-export': 'off',
'import/no-cycle': 'error',
'import/export': 'error',
'import/no-named-as-default': 'error',
'import/no-mutable-exports': 'error',
'import/first': 'error',
'import/no-duplicates': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'never',
},
],
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'padding-line-between-statements': [
'error',
{ blankLine: 'never', prev: 'import', next: 'import' },
{
blankLine: 'always',
prev: '*',
next: ['const', 'let', 'var'],
},
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var'],
},
{
blankLine: 'always',
prev: '*',
next: 'export',
},
{
blankLine: 'always',
prev: '*',
next: 'function',
},
{
blankLine: 'any',
prev: 'function',
next: 'function',
},
{
blankLine: 'always',
prev: '*',
next: 'expression',
},
{
blankLine: 'any',
prev: 'expression',
next: 'expression',
},
{
blankLine: 'always',
prev: '*',
next: 'return',
},
{
blankLine: 'always',
prev: '*',
next: 'block-like',
},
],
},
};