Chore: move to eslint (#6270)
Some checks failed
Docker CI / Linting Checks (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Crowdin Action / Crowdin Sync (push) Has been cancelled

This commit is contained in:
shamoon
2026-02-02 15:18:30 -08:00
committed by GitHub
parent 1233b5e803
commit 97e909ebf4
29 changed files with 121 additions and 85 deletions

View File

@@ -1,6 +1,5 @@
// prettyBytes taken from https://github.com/sindresorhus/pretty-bytes
/* eslint-disable no-param-reassign */
const BYTE_UNITS = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
const BIBYTE_UNITS = ["B", "kiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
@@ -37,7 +36,6 @@ function prettyBytes(number, options) {
...options,
};
// eslint-disable-next-line no-nested-ternary
const UNITS = options.bits ? (options.binary ? BIBIT_UNITS : BIT_UNITS) : options.binary ? BIBYTE_UNITS : BYTE_UNITS;
if (options.signed && number === 0) {
@@ -45,7 +43,7 @@ function prettyBytes(number, options) {
}
const isNegative = number < 0;
// eslint-disable-next-line no-nested-ternary
const prefix = isNegative ? "-" : options.signed ? "+" : "";
if (isNegative) {