-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (55 loc) · 1.79 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
const DISABLED = 0;
const WARNING = 1;
const ERROR = 2;
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
],
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
],
env: {
'browser': true,
'node': true,
},
rules: {
'sort-imports': WARNING,
'import/extensions': [ERROR, 'never'],
'indent': [ERROR, 4, {SwitchCase: 1}],
'max-len': [ERROR, 120],
'no-param-reassign': WARNING,
'no-plusplus': DISABLED,
'no-continue': DISABLED,
'no-prototype-builtins': DISABLED,
'no-multi-spaces': WARNING,
'wrap-iife': DISABLED,
'import/prefer-default-export': DISABLED,
'import/no-unresolved': DISABLED,
'no-use-before-define': [ERROR, 'nofunc'],
'@typescript-eslint/no-use-before-define': [ERROR, 'nofunc'],
'@typescript-eslint/camelcase': DISABLED,
'object-curly-newline': DISABLED,
'@typescript-eslint/explicit-function-return-type': DISABLED,
'@typescript-eslint/no-empty-function': WARNING,
'lines-between-class-members': [WARNING, 'always', {"exceptAfterSingleLine": true}],
'no-underscore-dangle': DISABLED,
'@typescript-eslint/explicit-member-accessibility': DISABLED,
'linebreak-style': DISABLED,
'no-mixed-operators': [ERROR, {
allowSamePrecedence: true,
groups: [
["%", "**"],
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
}],
},
};