-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
75 lines (72 loc) · 1.66 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
const OFF = 0;
const WARN = 1;
const ERROR = 2;
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: ['airbnb-base'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
settings: {
'import/resolver': {
node: { extensions: ['.tsx', '.ts', '.js', '.json'] },
typescript: {},
},
},
rules: {
'import/extensions': [
ERROR,
'ignorePackages',
{
ts: 'never',
js: 'never',
},
],
'import/no-extraneous-dependencies': OFF,
'import/prefer-default-export': OFF,
'@typescript-eslint/indent': [2, ERROR],
'@typescript-eslint/no-use-before-define': OFF,
'@typescript-eslint/no-param-reassign': OFF,
'lines-between-class-members': [ERROR, 'always'],
'linebreak-style': [ERROR, 'unix'],
quotes: [ERROR, 'single'],
semi: [ERROR, 'always'],
'no-unused-expressions': WARN,
'no-plusplus': OFF,
'no-console': OFF,
'class-methods-use-this': ERROR,
'global-require': OFF,
'no-use-before-define': OFF,
'no-restricted-syntax': OFF,
'no-continue': OFF,
indent: OFF,
'no-param-reassign': OFF,
'no-unused-vars': WARN,
'object-curly-newline': [
WARN,
{
ObjectExpression: {
multiline: true,
minProperties: 3,
},
ObjectPattern: { multiline: true },
ImportDeclaration: 'never',
ExportDeclaration: {
multiline: true,
minProperties: 3,
},
},
],
},
};