-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
174 lines (174 loc) · 4.82 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{
"root": true,
"ignorePatterns": ["**/*", "**/*.config.ts"],
"env": {
"browser": true,
"es2022": true
},
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"off",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"plugins": ["@typescript-eslint", "import", "wc", "lit", "lit-a11y"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"google",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:wc/best-practice",
"plugin:lit/recommended",
"plugin:@nrwl/nx/typescript"
],
"rules": {
"sort-vars": "error",
"indent": "off",
"max-len": "off",
"wc/guard-super-call": "off",
"no-misleading-character-class": "off",
"no-throw-literal": "off",
"new-cap": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off",
"prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }],
"class-methods-use-this": [
"error",
{
"exceptMethods": [
"connectedCallback",
"disconnectedCallback",
"performUpdate",
"shouldUpdate",
"firstUpdated",
"update",
"updated",
"createRenderRoot",
"render"
]
}
],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
["sibling", "index"],
"type"
],
"alphabetize": {
"order": "asc",
"caseInsensitive": false
},
"pathGroups": [
{
"pattern": "#hami/**",
"group": "builtin",
"position": "before"
},
{
"pattern": "#gtodo/**",
"group": "builtin",
"position": "before"
},
{
"pattern": "#persianpart/**",
"group": "builtin",
"position": "before"
},
{
"pattern": "virtual:icons/**",
"group": "internal",
"position": "after"
}
],
"warnOnUnassignedImports": true,
"newlines-between": "always",
"distinctGroup": false
}
],
"import/no-unresolved": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "separate-type-imports"
}
],
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"signature",
"constructor",
"static-field",
"public-field",
"protected-field",
"private-field",
"field",
"public-method",
"static-method",
"protected-method",
"private-method",
"method"
]
}
],
"lit/no-template-bind": "error",
"lit/no-duplicate-template-bindings": "error",
"lit/no-useless-template-literals": "error",
"lit/attribute-value-entities": "error",
"lit/binding-positions": "error",
"lit/no-invalid-html": "error",
"lit/no-value-attribute": "error",
"lit/no-invalid-escape-sequences": "error",
"lit/no-legacy-template-syntax": "error",
"lit/no-private-properties": "error",
"lit/no-native-attributes": "error",
"lit-a11y/click-events-have-key-events": "warn",
"lit-a11y/mouse-events-have-key-events": "warn",
"lit-a11y/valid-lang": "error",
"lit-a11y/autocomplete-valid": "error",
"object-curly-spacing": ["error", "always"]
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}