-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
60 lines (56 loc) · 1.88 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.eslint.json'],
extraFileExtensions: ['.raw'],
},
plugins: ['@typescript-eslint', 'prettier', 'import'],
rules: {
'prettier/prettier': 'error',
'no-plusplus': 'off',
'no-console': 'off',
'no-continue': 'off',
'consistent-return': 'off',
'import/prefer-default-export': 'off',
'no-loop-func': 'off',
'@typescript-eslint/no-loop-func': 'off',
'no-param-reassign': ['error', { props: false }],
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/no-use-before-define': ['error', { ignoreTypeReferences: false }],
'prefer-destructuring': [
'error',
{
VariableDeclarator: { array: false, object: true },
AssignmentExpression: { array: false, object: true },
},
{ enforceForRenamedProperties: false },
],
'lines-around-comment': [
'error',
{
allowArrayStart: true,
allowBlockStart: true,
allowClassStart: true,
allowObjectStart: true,
beforeBlockComment: true,
beforeLineComment: true,
},
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'class', next: '*' },
{ blankLine: 'always', prev: '*', next: 'class' },
{ blankLine: 'always', prev: 'function', next: '*' },
{ blankLine: 'always', prev: '*', next: 'function' },
{ blankLine: 'always', prev: '*', next: 'export' },
{ blankLine: 'always', prev: 'import', next: '*' },
{ blankLine: 'any', prev: 'import', next: 'import' },
{ blankLine: 'any', prev: 'export', next: 'export' },
],
},
ignorePatterns: ['out', 'dist', '**/*.d.ts'],
};