-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (69 loc) · 1.7 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
module.exports = {
root: true,
env: {
es6: true,
},
extends: ['standard', 'plugin:prettier/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [],
rules: {
'no-multiple-empty-lines': [
'error',
{
max: 1,
maxEOF: 0,
maxBOF: 0,
},
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'block-like', next: 'export' },
],
'no-void': [
'error',
{
allowAsStatement: true,
},
],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'standard-with-typescript',
'prettier',
],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{ checksVoidReturn: false },
],
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'allow',
},
],
'@typescript-eslint/array-type': ['error', { default: 'array' }],
'@typescript-eslint/return-await': ['error', 'in-try-catch'],
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
{
files: ['**/.eslintrc.js'],
parser: 'espree',
},
],
}