forked from TYPO3/typo3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
118 lines (117 loc) · 3.09 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
const path = require('path');
module.exports = {
"root": true,
"env": {
"browser": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": [path.resolve(__dirname, "./tsconfig.eslint.json")]
},
"plugins": [
"@typescript-eslint",
"lit",
"wc"
],
"settings": {
"wc": {
"elementBaseClasses": [
"LitElement"
]
}
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:wc/recommended",
"plugin:lit/recommended"
],
"rules": {
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/no-inferrable-types": "off", // we want to keep explicit type casting
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-explicit-any": "off", // too many warnings/errors for now, needs be fixed step by step
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "class",
"format": ["PascalCase"]
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
],
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"curly": "error",
"default-case": "error",
"dot-notation": "error",
"eol-last": "error",
"guard-for-in": "error",
"lit/no-duplicate-template-bindings": "error",
"lit/no-native-attributes": "error",
"lit/no-invalid-escape-sequences": "error",
"lit/no-legacy-imports": "error",
"lit/no-useless-template-literals": "error",
"lit/prefer-nothing": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-debugger": "error",
"no-empty": "error",
"no-empty-function": ["error", {
"allow": ["constructors"]
}],
"no-eval": "error",
"no-fallthrough": "error",
"no-new-wrappers": "error",
"no-unused-labels": "error",
"no-multi-spaces": "error",
"no-var": "error",
"no-case-declarations": "off",
"no-restricted-properties": [
"error",
{
"object": "window",
"property": "jQuery",
"message": "Use `import jQuery from 'jquery'` instead."
},
{
"object": "window",
"property": "$",
"message": "Use `import $ from 'jquery'` instead."
}
],
"no-restricted-globals": [
"error",
{
"name": "jQuery",
"message": "Use `import jQuery from 'jquery'` instead."
},
{
"name": "$",
"message": "Use `import $ from 'jquery'` instead."
}
],
"object-curly-spacing": [
"error",
"always"
],
"quotes": [
"error",
"single"
],
"radix": "error",
"semi": "off",
"space-infix-ops": "error",
"wc/no-constructor-params": "error",
"wc/no-typos": "error",
"wc/require-listener-teardown": "error"
}
}