Skip to content

Commit 68f69b6

Browse files
Fix eslint errors
1 parent 4590dc7 commit 68f69b6

5 files changed

Lines changed: 1456 additions & 487 deletions

File tree

src/layout.css

Lines changed: 125 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,18 @@
7272
* <div class="inline-block bg-darken10">inline-block</div>
7373
* <div class="none bg-darken10">none</div>
7474
*/
75-
.inline { display: inline !important; }
76-
.block { display: block !important; }
77-
.inline-block { display: inline-block !important; }
78-
.none { display: none !important; }
75+
.inline {
76+
display: inline !important;
77+
}
78+
.block {
79+
display: block !important;
80+
}
81+
.inline-block {
82+
display: inline-block !important;
83+
}
84+
.none {
85+
display: none !important;
86+
}
7987
/** @endgroup */
8088

8189
/**
@@ -102,11 +110,21 @@
102110
* -->
103111
* </div>
104112
*/
105-
.fixed { position: fixed !important; }
106-
.absolute { position: absolute !important; }
107-
.relative { position: relative !important; }
108-
.static { position: static !important; }
109-
.sticky { position: sticky !important; }
113+
.fixed {
114+
position: fixed !important;
115+
}
116+
.absolute {
117+
position: absolute !important;
118+
}
119+
.relative {
120+
position: relative !important;
121+
}
122+
.static {
123+
position: static !important;
124+
}
125+
.sticky {
126+
position: sticky !important;
127+
}
110128
/** @endgroup */
111129

112130
/**
@@ -122,10 +140,18 @@
122140
* <div class="absolute bg-darken10 top left right align-center">top left right</div>
123141
* </div>
124142
*/
125-
.top { top: 0 !important; }
126-
.right { right: 0 !important; }
127-
.left { left: 0 !important; }
128-
.bottom { bottom: 0 !important; }
143+
.top {
144+
top: 0 !important;
145+
}
146+
.right {
147+
right: 0 !important;
148+
}
149+
.left {
150+
left: 0 !important;
151+
}
152+
.bottom {
153+
bottom: 0 !important;
154+
}
129155
/** @endgroup */
130156

131157
/**
@@ -141,13 +167,27 @@
141167
* <div class="absolute z1-neg1 bg-blue px6 py6 mt24 ml60">z-neg1</div>
142168
* </div>
143169
*/
144-
.z-neg1 { z-index: -1 !important; }
145-
.z0 { z-index: 0 !important; }
146-
.z1 { z-index: 1 !important; }
147-
.z2 { z-index: 2 !important; }
148-
.z3 { z-index: 3 !important; }
149-
.z4 { z-index: 4 !important; }
150-
.z5 { z-index: 5 !important; }
170+
.z-neg1 {
171+
z-index: -1 !important;
172+
}
173+
.z0 {
174+
z-index: 0 !important;
175+
}
176+
.z1 {
177+
z-index: 1 !important;
178+
}
179+
.z2 {
180+
z-index: 2 !important;
181+
}
182+
.z3 {
183+
z-index: 3 !important;
184+
}
185+
.z4 {
186+
z-index: 4 !important;
187+
}
188+
.z5 {
189+
z-index: 5 !important;
190+
}
151191
/** @endgroup */
152192

153193
/**
@@ -163,7 +203,7 @@
163203
*/
164204

165205
/**
166-
* Set `auto` margins on left and right. This pattern is useful for horizontally centering block elements
206+
* Set `auto` margins on left and right. This pattern is useful for horizontally centering block elements
167207
* or aligning block elements to the start or end of their container.
168208
*
169209
* @example
@@ -172,9 +212,16 @@
172212
* <div class='mr-auto w60 bg-darken10'>mr-auto</div>
173213
* @memberof Margins
174214
*/
175-
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
176-
.ml-auto { margin-left: auto !important; }
177-
.mr-auto { margin-right: auto !important; }
215+
.mx-auto {
216+
margin-left: auto !important;
217+
margin-right: auto !important;
218+
}
219+
.ml-auto {
220+
margin-left: auto !important;
221+
}
222+
.mr-auto {
223+
margin-right: auto !important;
224+
}
178225

179226
/**
180227
* All padding classes fit the following pattern: `m<side><size>`.
@@ -214,8 +261,12 @@
214261
* <div class='bg-darken10 flex'>flex</div>
215262
* <div class='bg-darken10 inline-flex'>inline-flex</div>
216263
*/
217-
.flex { display: flex !important; }
218-
.inline-flex { display: inline-flex !important; }
264+
.flex {
265+
display: flex !important;
266+
}
267+
.inline-flex {
268+
display: inline-flex !important;
269+
}
219270
/** @endgroup */
220271

221272
/**
@@ -229,7 +280,9 @@
229280
* <span>3</span>
230281
* </div>
231282
*/
232-
.flex--column { flex-direction: column !important; }
283+
.flex--column {
284+
flex-direction: column !important;
285+
}
233286

234287
/**
235288
* Set the direction of the main axis to bottom-to-top (default is left-to-right).
@@ -242,7 +295,9 @@
242295
* <span>3</span>
243296
* </div>
244297
*/
245-
.flex--column-reverse { flex-direction: column-reverse !important; }
298+
.flex--column-reverse {
299+
flex-direction: column-reverse !important;
300+
}
246301

247302
/**
248303
* Set the direction of the main axis to left-to-right (the default value of `flex`).
@@ -255,7 +310,9 @@
255310
* <span>3</span>
256311
* </div>
257312
*/
258-
.flex--row { flex-direction: row !important; }
313+
.flex--row {
314+
flex-direction: row !important;
315+
}
259316

260317
/**
261318
* Set the direction of the main axis to right-to-left (default is left-to-right).
@@ -268,7 +325,9 @@
268325
* <span>3</span>
269326
* </div>
270327
*/
271-
.flex--row-reverse { flex-direction: row-reverse !important; }
328+
.flex--row-reverse {
329+
flex-direction: row-reverse !important;
330+
}
272331

273332
/**
274333
* Center an element's children on the main axis.
@@ -279,7 +338,9 @@
279338
* <div class='bg-darken10'>child</div>
280339
* </div>
281340
*/
282-
.flex--center-main { justify-content: center !important; }
341+
.flex--center-main {
342+
justify-content: center !important;
343+
}
283344

284345
/**
285346
* Center an element's children on the cross axis.
@@ -290,7 +351,9 @@
290351
* <div class='bg-darken10'>child</div>
291352
* </div>
292353
*/
293-
.flex--center-cross { align-items: center !important; }
354+
.flex--center-cross {
355+
align-items: center !important;
356+
}
294357

295358
/**
296359
* Align an element's children to the start of the cross axis.
@@ -302,7 +365,9 @@
302365
* <div class='bg-darken10'>child</div>
303366
* </div>
304367
*/
305-
.flex--start-cross { align-items: flex-start !important; }
368+
.flex--start-cross {
369+
align-items: flex-start !important;
370+
}
306371

307372
/**
308373
* Align an element's children to the start of the main axis.
@@ -313,7 +378,9 @@
313378
* <div class='bg-darken10'>child</div>
314379
* </div>
315380
*/
316-
.flex--start-main { justify-content: flex-start !important; }
381+
.flex--start-main {
382+
justify-content: flex-start !important;
383+
}
317384

318385
/**
319386
* Align an element's children to the end of the cross axis.
@@ -325,7 +392,9 @@
325392
* <div class='bg-darken10'>child</div>
326393
* </div>
327394
*/
328-
.flex--end-cross { align-items: flex-end !important; }
395+
.flex--end-cross {
396+
align-items: flex-end !important;
397+
}
329398

330399
/**
331400
* Align an element's children to the end of the main axis.
@@ -336,7 +405,9 @@
336405
* <div class='bg-darken10'>child</div>
337406
* </div>
338407
*/
339-
.flex--end-main { justify-content: flex-end !important; }
408+
.flex--end-main {
409+
justify-content: flex-end !important;
410+
}
340411

341412
/**
342413
* Allow children to wrap. By default, they are all forced onto one line.
@@ -348,7 +419,9 @@
348419
* <div class='bg-darken10 w600'>child</div>
349420
* </div>
350421
*/
351-
.flex--wrap { flex-wrap: wrap !important; }
422+
.flex--wrap {
423+
flex-wrap: wrap !important;
424+
}
352425

353426
/**
354427
* Stretch children to fill the parent container along the cross axis.
@@ -359,7 +432,9 @@
359432
* <div class='bg-darken10'>child</div>
360433
* </div>
361434
*/
362-
.flex--stretch-cross { align-items: stretch !important; }
435+
.flex--stretch-cross {
436+
align-items: stretch !important;
437+
}
363438

364439
/**
365440
* Evenly distribute children across the line, so first child is at the start
@@ -372,7 +447,9 @@
372447
* <div class='bg-darken10'>child</div>
373448
* </div>
374449
*/
375-
.flex--space-between-main { justify-content: space-between !important; }
450+
.flex--space-between-main {
451+
justify-content: space-between !important;
452+
}
376453

377454
/**
378455
* Make a child to grow to fill whatever space is available in the main axis of the parent container.
@@ -479,9 +556,15 @@
479556
* <div class='bg-darken10'> without .clearfix </div>
480557
* <div class='fl unfloat'>unfloat</div>
481558
*/
482-
.fl { float: left !important; }
483-
.fr { float: right !important; }
484-
.unfloat { float: none !important; }
559+
.fl {
560+
float: left !important;
561+
}
562+
.fr {
563+
float: right !important;
564+
}
565+
.unfloat {
566+
float: none !important;
567+
}
485568
.clearfix::after {
486569
content: '' !important;
487570
display: block !important;

src/md4-shim.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
const crypto = require('crypto')
1+
'use strict';
2+
const crypto = require('crypto');
23
// MD4 algorithm is not available anymore in NodeJS 17+ (because of lib SSL 3).
34
// https://stackoverflow.com/a/72219174/1447466
45
// config.output.hashFunction = 'md5'
56
// is supposed to disables MD4, but it doesn't work correctly until
67
// https://github.com/webpack/webpack/pull/14306
78
try {
8-
crypto.createHash('md4')
9+
crypto.createHash('md4');
910
} catch (e) {
10-
let printed = false
11-
const print = alg => {
12-
if (alg != 'md4') return
13-
if (printed) return
14-
printed = true
15-
console.warn('MD4 is unsupported, replacing it with MD5')
16-
}
17-
const createHash = crypto.createHash
18-
crypto.createHash = (alg, ...params) => {
19-
print(alg)
20-
return createHash(alg == 'md4' ? 'md5' : alg, ...params)
21-
}
11+
let printed = false;
12+
const print = alg => {
13+
if (alg !== 'md4') return;
14+
if (printed) return;
15+
printed = true;
16+
console.warn('MD4 is unsupported, replacing it with MD5');
17+
};
18+
const createHash = crypto.createHash;
19+
crypto.createHash = (alg, ...params) => {
20+
print(alg);
21+
return createHash(alg === 'md4' ? 'md5' : alg, ...params);
22+
};
2223
}

0 commit comments

Comments
 (0)