format: prettify entire project

This commit is contained in:
Rim
2025-04-02 06:50:39 -04:00
parent 86f0782a98
commit 7ccc0be712
1711 changed files with 755867 additions and 235931 deletions

View File

@ -2,8 +2,7 @@ function cloneArray(array) {
var cloned = array.slice(0);
for (var i = 0, l = cloned.length; i < l; i++) {
if (Array.isArray(cloned[i]))
cloned[i] = cloneArray(cloned[i]);
if (Array.isArray(cloned[i])) cloned[i] = cloneArray(cloned[i]);
}
return cloned;

View File

@ -3,9 +3,7 @@ function formatPosition(metadata) {
var column = metadata[1];
var source = metadata[2];
return source ?
source + ':' + line + ':' + column :
line + ':' + column;
return source ? source + ':' + line + ':' + column : line + ':' + column;
}
module.exports = formatPosition;

View File

@ -19,13 +19,15 @@ function naturalCompare(value1, value2) {
}
}
return keys1.length > keys2.length ? 1 : (keys1.length == keys2.length ? 0 : -1);
return (
keys1.length > keys2.length ? 1
: keys1.length == keys2.length ? 0
: -1
);
}
function tryParseInt(value) {
return ('' + parseInt(value)) == value ?
parseInt(value) :
value;
return '' + parseInt(value) == value ? parseInt(value) : value;
}
module.exports = naturalCompare;

View File

@ -26,7 +26,12 @@ function split(value, separator) {
level--;
}
if (level === 0 && cursor > 0 && cursor + 1 < len && value[cursor] == separator) {
if (
level === 0 &&
cursor > 0 &&
cursor + 1 < len &&
value[cursor] == separator
) {
parts.push(value.substring(lastStart, cursor));
lastStart = cursor + 1;
}