Skip to content

Commit 517e2fe

Browse files
committed
build: update eslint config
1 parent b8b816b commit 517e2fe

File tree

3 files changed

+152
-17
lines changed

3 files changed

+152
-17
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
**/vendor/
44
/_gh_pages/
55
/js/coverage/
6-
/js/tests/integration/
76
/docs/content/_index.html
87
/docs/static/sw.js
98
/docs/layouts/

.eslintrc.json

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,35 @@
1414
"error",
1515
"never"
1616
],
17+
"import/extensions": [
18+
"error",
19+
"ignorePackages",
20+
{
21+
"js": "always"
22+
}
23+
],
24+
"import/first": "error",
25+
"import/newline-after-import": "error",
26+
"import/no-absolute-path": "error",
27+
"import/no-amd": "error",
28+
"import/no-cycle": [
29+
"error",
30+
{
31+
"ignoreExternal": true
32+
}
33+
],
34+
"import/no-duplicates": "error",
35+
"import/no-extraneous-dependencies": "error",
36+
"import/no-mutable-exports": "error",
37+
"import/no-named-as-default": "error",
38+
"import/no-named-as-default-member": "error",
39+
"import/no-named-default": "error",
40+
"import/no-self-import": "error",
41+
"import/no-unassigned-import": [
42+
"error"
43+
],
44+
"import/no-useless-path-segments": "error",
45+
"import/order": "error",
1746
"indent": [
1847
"error",
1948
2,
@@ -51,12 +80,15 @@
5180
"error",
5281
"never"
5382
],
83+
"strict": "error",
5484
"unicorn/explicit-length-check": "off",
85+
"unicorn/filename-case": "off",
5586
"unicorn/no-array-callback-reference": "off",
5687
"unicorn/no-array-method-this-argument": "off",
5788
"unicorn/no-null": "off",
5889
"unicorn/no-typeof-undefined": "off",
5990
"unicorn/no-unused-properties": "error",
91+
"unicorn/numeric-separators-style": "off",
6092
"unicorn/prefer-array-flat": "off",
6193
"unicorn/prefer-at": "off",
6294
"unicorn/prefer-dom-node-dataset": "off",
@@ -65,5 +97,124 @@
6597
"unicorn/prefer-spread": "off",
6698
"unicorn/prefer-string-replace-all": "off",
6799
"unicorn/prevent-abbreviations": "off"
68-
}
100+
},
101+
"overrides": [
102+
{
103+
"files": [
104+
"build/**"
105+
],
106+
"env": {
107+
"browser": false,
108+
"node": true
109+
},
110+
"parserOptions": {
111+
"sourceType": "script"
112+
},
113+
"rules": {
114+
"no-console": "off",
115+
"unicorn/prefer-top-level-await": "off"
116+
}
117+
},
118+
{
119+
"files": [
120+
"js/**"
121+
],
122+
"parserOptions": {
123+
"sourceType": "module"
124+
}
125+
},
126+
{
127+
"files": [
128+
"js/tests/*.js",
129+
"js/tests/integration/rollup*.js"
130+
],
131+
"env": {
132+
"node": true
133+
},
134+
"parserOptions": {
135+
"sourceType": "script"
136+
}
137+
},
138+
{
139+
"files": [
140+
"js/tests/unit/**"
141+
],
142+
"env": {
143+
"jasmine": true
144+
},
145+
"rules": {
146+
"no-console": "off",
147+
"unicorn/consistent-function-scoping": "off",
148+
"unicorn/no-useless-undefined": "off",
149+
"unicorn/prefer-add-event-listener": "off"
150+
}
151+
},
152+
{
153+
"files": [
154+
"js/tests/visual/**"
155+
],
156+
"plugins": [
157+
"html"
158+
],
159+
"settings": {
160+
"html/html-extensions": [
161+
".html"
162+
]
163+
},
164+
"rules": {
165+
"no-console": "off",
166+
"no-new": "off",
167+
"unicorn/no-array-for-each": "off"
168+
}
169+
},
170+
{
171+
"files": [
172+
"scss/tests/**"
173+
],
174+
"env": {
175+
"node": true
176+
},
177+
"parserOptions": {
178+
"sourceType": "script"
179+
}
180+
},
181+
{
182+
"files": [
183+
"docs/**"
184+
],
185+
"env": {
186+
"browser": true,
187+
"node": false
188+
},
189+
"parserOptions": {
190+
"sourceType": "script",
191+
"ecmaVersion": 2019
192+
},
193+
"rules": {
194+
"no-new": "off",
195+
"unicorn/no-array-for-each": "off"
196+
}
197+
},
198+
{
199+
"files": [
200+
"**/*.md"
201+
],
202+
"plugins": [
203+
"markdown"
204+
],
205+
"processor": "markdown/markdown"
206+
},
207+
{
208+
"files": [
209+
"**/*.md/*.js"
210+
],
211+
"extends": "plugin:markdown/recommended",
212+
"parserOptions": {
213+
"sourceType": "module"
214+
},
215+
"rules": {
216+
"unicorn/prefer-node-protocol": "off"
217+
}
218+
}
219+
]
69220
}

build/.eslintrc.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)