-
Notifications
You must be signed in to change notification settings - Fork 39
/
.eslintrc.json
110 lines (110 loc) · 3.13 KB
/
.eslintrc.json
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
{
"env": {
"es6": true,
"browser": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2019
},
"plugins": [
"prettier",
"@typescript-eslint",
"simple-import-sort"
],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"simple-import-sort/imports": [
"error",
{
"groups": [
[
// Side-effects group
"^\\u0000",
// External group
"^",
// Vaadin group
"^@vaadin",
// Parent group
"^\\.\\.",
// Sibling group
"^\\."
]
]
}
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_"
}],
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"accessor-pairs": "error",
"array-callback-return": "error",
"curly": ["error", "all"],
"default-case": ["error", { "commentPattern": "^no\\sdefault" }],
"default-param-last": "error",
"dot-notation": ["error", { "allowPattern": "^[a-zA-Z]+([_-][a-zA-Z]+)+$" }],
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"grouped-accessor-pairs": ["error", "getBeforeSet"],
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"no-else-return": "error",
"no-implicit-coercion": ["error", { "allow": ["!!"] }],
"no-invalid-this": "error",
"no-lonely-if": "error",
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-promise-executor-return": "error",
"no-proto": "error",
"no-return-await": "error",
"no-sequences": "error",
"no-sync": "off",
"no-throw-literal": "error",
"no-useless-return": "error",
"operator-assignment": ["error", "always"],
"prefer-const": ["error", { "ignoreReadBeforeAssign": true }],
"prefer-exponentiation-operator": "error",
"prefer-object-spread": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"space-in-parens": ["error", "never"],
"spaced-comment": ["error", "always"]
},
"overrides": [
{
"files": ["test/**/*"],
"rules": {
"no-await-in-loop": "off",
"max-classes-per-file": "off",
"simple-import-sort/imports": [
"error",
{
"groups": [
[
// Testing tools group
"^(@esm-bundle|@web|@vaadin/testing-helpers|sinon)",
// Side-effects group
"^\\u0000",
// External group
"^",
// Vaadin group
"^@vaadin",
// Parent group
"^\\.\\.",
// Sibling group
"^\\."
]
]
}
]
}
}
]
}