-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
137 lines (115 loc) · 4.01 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/**
* ESLint config.
*
* @license Apache-2.0
* @copyright Mat. 2018-present
*/
"use strict";
// ...
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
},
"extends": [
"eslint:recommended",
],
"plugins": [
"import",
],
"root": true,
"rules": {
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline",
"imports": "always-multiline",
"objects": "always-multiline",
},
],
"import/first": "error",
"import/no-amd": "error",
"import/no-webpack-loader-syntax": "error",
"indent": ["warn", 4, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"no-console": "warn",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-redeclare": "error",
"no-undef": "error",
"no-unexpected-multiline": "error",
"no-unused-vars": ["warn", { "args": "all", "argsIgnorePattern": "^_" }],
"object-curly-newline": "off",
"object-curly-spacing": ["error", "always"],
"prefer-const": "warn",
"quotes": ["error", "double"],
"semi": ["error", "always"],
"space-before-function-paren": ["error", "always"],
"strict": "off",
},
"overrides": [
{
"files": ["*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true,
"tsconfigRootDir": __dirname,
},
"extends": [
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
"plugins": [
"@typescript-eslint",
],
"rules": {
"@typescript-eslint/comma-dangle": [
"error",
{
"arrays": "always-multiline",
"enums": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline",
"generics": "always-multiline",
"imports": "always-multiline",
"objects": "always-multiline",
"tuples": "always-multiline",
},
],
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/explicit-module-boundary-types": ["warn"],
"@typescript-eslint/indent": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-misused-promises": [
"error", { "checksVoidReturn": false },
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/no-unused-vars": [
"warn", { "args": "all", "argsIgnorePattern": "^_" },
],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/unbound-method": "off",
"comma-dangle": "off",
"no-unused-vars": "off",
"prefer-const": "warn",
"require-await": "off",
"semi": "off",
},
},
],
};