This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc
151 lines (151 loc) · 3.93 KB
/
.eslintrc
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"parserOptions": {
"parser": [
"babel-eslint"
],
"ecmaVersion": 2017,
"sourceType": "module"
},
"plugins": [
"jest",
"import"
],
"env": {
"jest": true
},
"extends": [
"eslint:recommended",
"airbnb-base",
"plugin:jest/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:@typescript-eslint/recommended"
],
"settings": {
"import/resolver": {
"webpack": {
"config": "webpack.config.js"
}
}
},
"rules": {
"import/extensions": ["off"],
"import/no-unresolved": "off",
"import/no-unassigned-import": ["error"],
"no-tabs": ["off"],
"indent": ["error", "tab", {"SwitchCase": 1}],
"unicorn/filename-case": ["off", {"case": "camelCase"}],
"brace-style": ["error", "1tbs"],
"keyword-spacing": ["error", {
"before": true, "after": false, "overrides": {
"from": {"before": true, "after": true},
"import": {"after": true},
"case": {"after": true},
"return": {"after": true},
"const": {"after": true},
"let": {"after": true},
"try": {"after": true},
"catch": {"after": true},
"if": {"after": true},
"else": {"after": true},
"export": {"after": true},
"for": {"after": true}
}
}],
"no-plusplus": "off",
"linebreak-style": ["off"],
"lines-around-comment": ["off"],
"max-len": ["error", 300, 4, {"ignoreUrls": true, "ignoreComments": true, "ignorePattern": "^import\\s.+\\sfrom\\s.+;$"}],
"padding-line-between-statements": ["error",
{ "blankLine": "always", "prev": ["block",
"block-like",
"break",
"case",
"cjs-export",
"cjs-import",
"class",
"continue",
"debugger",
"default",
"directive",
"do",
"empty",
"export",
"for",
"function",
"if",
"import",
"let",
"multiline-block-like",
"multiline-expression",
"return",
"switch",
"throw",
"try",
"var",
"while",
"with"], "next": "*" },
{ "blankLine": "never", "prev": "import", "next": "import" },
{ "blankLine": "any", "prev": "export", "next": "export" },
{ "blankLine": "any", "prev": "const", "next": "const" },
{ "blankLine": "never", "prev": "const", "next": "let" },
{ "blankLine": "never", "prev": "let", "next": "const" },
{ "blankLine": "always", "prev": "expression", "next": "return" }
],
"padded-blocks": ["error", "always"],
"no-console": ["off", {"allow": ["warn", "error"]}],
"no-inline-comments": ["off"],
"one-var": ["error", {"var": "always", "let": "always", "const": "never"}],
"no-shadow": ["off"],
"comma-dangle": ["error", "never"],
"no-param-reassign": ["off"],
"arrow-parens": ["error", "always"],
"arrow-body-style": ["off"],
"prefer-destructuring": ["error",
{
"VariableDeclarator": {
"array": true,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
},
{
"enforceForRenamedProperties": false
}
],
"global-require": ["off"],
"import/no-dynamic-require": ["off"],
"class-methods-use-this": ["off"],
"no-underscore-dangle": ["off"],
"object-curly-newline": ["error", { "consistent": true}],
"import/newline-after-import": ["off"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"implicit-arrow-linebreak": ["off"],
"operator-linebreak": ["error", "after"],
"no-else-return": ["error", { "allowElseIf": true }],
"no-bitwise": ["error", { "allow": ["^"] }],
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"new-cap": ["error", { "newIsCapExceptions": ["sha256"] }],
"strict": ["off"],
"import/prefer-default-export": ["off"]
},
"overrides": [
{
"files": ["**/*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"no-undef": "off",
"indent": "off",
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-member-accessibility": "off"
}
}
]
}