DEV: enforces eslint’s curly rule to the codebase (#10720)

eslint --fix is capable of fix it automatically for you, ensure prettier is run after eslint as eslint --fix could leave the code in an invalid prettier state.
This commit is contained in:
Joffrey JAFFEUX
2020-09-22 16:28:28 +02:00
committed by GitHub
parent c86538097d
commit 530d9ab071
179 changed files with 1246 additions and 434 deletions

View File

@ -378,12 +378,15 @@ function md51(s) {
}
s = s.substring(i - 64);
var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
for (i = 0; i < s.length; i++)
for (i = 0; i < s.length; i++) {
tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
}
tail[i >> 2] |= 0x80 << (i % 4 << 3);
if (i > 55) {
md5cycle(state, tail);
for (i = 0; i < 16; i++) tail[i] = 0;
for (i = 0; i < 16; i++) {
tail[i] = 0;
}
}
tail[14] = n * 8;
md5cycle(state, tail);
@ -409,13 +412,16 @@ var hex_chr = "0123456789abcdef".split("");
function rhex(n) {
var s = "",
j = 0;
for (; j < 4; j++)
for (; j < 4; j++) {
s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];
}
return s;
}
function hex(x) {
for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);
for (var i = 0; i < x.length; i++) {
x[i] = rhex(x[i]);
}
return x.join("");
}