-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.json
150 lines (150 loc) · 3.62 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
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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:storybook/recommended",
"plugin:@stencil-community/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"rules": {
"curly": "warn",
"no-duplicate-imports": "error",
"no-console": ["warn", {"allow": ["warn", "error"]}],
"constructor-super": "off",
"no-fallthrough": "warn",
"no-self-compare": "error",
"no-unmodified-loop-condition": "error",
"keyword-spacing": "warn",
"lines-between-class-members": "error",
"no-else-return": "error",
"no-useless-return": "error",
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": "return"
}
],
"no-lonely-if": "error",
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"varsIgnorePattern": "h"
}
],
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"]
},
{
"selector": "parameter",
"modifiers": ["unused"],
"format": ["camelCase"],
"leadingUnderscore": "require"
},
{
"selector": "variable",
"modifiers": ["const", "global"],
"format": ["UPPER_CASE", "camelCase"]
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"]
},
{
"selector": "classProperty",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "objectLiteralProperty",
"format": null
},
{
"selector": "import",
"format": null
}
],
"react/jsx-no-bind": "off",
"@stencil-community/ban-default-true": "off",
"@stencil-community/reserved-member-names": "off",
"@stencil-community/ban-exported-const-enums": "off",
"@stencil-community/strict-boolean-conditions": "off",
"@stencil-community/class-pattern": [
"error",
{
"pattern": "^Z[A-Z].*$"
}
],
"@stencil-community/decorators-style": [
"error",
{
"prop": "multiline",
"state": "multiline",
"element": "inline",
"event": "multiline",
"method": "multiline",
"watch": "multiline",
"listen": "multiline"
}
],
"@stencil-community/required-prefix": ["error", ["z"]],
"@stencil-community/prefer-vdom-listener": "off"
},
"overrides": [
{
"files": ["*.stories.ts"],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"modifiers": ["exported"],
"format": ["PascalCase"]
}
],
"no-duplicate-imports": "off"
}
},
{
"files": ["*.spec.ts"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off"
}
}
]
}