-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
117 lines (117 loc) · 3.12 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
overrides: [
{
env: {
'jest/globals': true,
},
files: ['*.spec.*'],
plugins: ['jest'],
},
],
parserOptions: {
ecmaVersion: 13,
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
'sort-keys-fix',
'sort-destructure-keys',
'typescript-sort-keys',
],
rules: {
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-redeclare': ['error'],
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'arrow-body-style': 'off',
'brace-style': 'off',
camelcase: 'off',
'class-methods-use-this': 'off',
'consistent-return': 0,
curly: ['error', 'multi-line'],
'default-param-last': 'warn',
'eol-last': 2,
'function-paren-newline': 0,
'global-require': 0,
'implicit-arrow-linebreak': 0,
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/order': [
'error',
{
alphabetize: { caseInsensitive: true, order: 'asc' },
groups: [
['builtin', 'external'],
'parent',
'sibling',
'index',
'object',
],
'newlines-between': 'always',
},
],
'import/prefer-default-export': 'off',
indent: 'off',
'max-classes-per-file': 'off',
'max-len': 'off',
'no-confusing-arrow': 'off',
'no-console': ['warn', { allow: ['warn', 'error', 'info', 'debug'] }],
'no-continue': 'off',
'no-lonely-if': 'off',
'no-nested-ternary': 'off',
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-prototype-builtins': 'off',
'no-redeclare': 'off',
'no-restricted-exports': 'warn',
'no-restricted-syntax': 'off',
'no-return-assign': 'off',
'no-shadow': 'off',
'no-unused-expressions': 0, // disabled in favor of @babel version above
'no-use-before-define': 0,
'nonblock-statement-body-position': 0,
'object-curly-newline': 'off',
'operator-assignment': 'off',
'operator-linebreak': 'off',
'prefer-destructuring': [
'error',
{
AssignmentExpression: { array: false, object: false },
VariableDeclarator: { array: false, object: true },
},
],
'prefer-template': 0,
'prettier/prettier': 'error',
'sort-destructure-keys/sort-destructure-keys': 'error',
'sort-imports': [
'error',
{ ignoreCase: true, ignoreDeclarationSort: true },
],
'sort-keys-fix/sort-keys-fix': 'error',
'space-before-function-paren': 'off',
'typescript-sort-keys/interface': 'error',
'typescript-sort-keys/string-enum': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts'],
},
},
},
};