feat: eslint 적용 및 관련 코드 일괄 수정

This commit is contained in:
2026-01-05 15:46:47 +00:00
parent cb312f02b3
commit c965b1120f
387 changed files with 39808 additions and 38800 deletions
+3 -8
View File
@@ -10,24 +10,19 @@ type NodeHash = {
type NodeCreateHash = (algorithm: 'sha512') => NodeHash;
const isNode = typeof process !== 'undefined'
&& typeof process.versions?.node === 'string';
const isNode = typeof process !== 'undefined' && typeof process.versions?.node === 'string';
const nodeCryptoSpecifier = 'node:crypto';
let nodeCreateHash: NodeCreateHash | null = null;
if (isNode) {
const nodeCrypto = await import(nodeCryptoSpecifier) as typeof import('node:crypto');
const nodeCrypto = (await import(nodeCryptoSpecifier)) as typeof import('node:crypto');
nodeCreateHash = nodeCrypto.createHash as NodeCreateHash;
}
function normalizeUint8Array(bytes: Uint8Array): Uint8Array<ArrayBuffer> {
if (
bytes.buffer instanceof ArrayBuffer
&& bytes.byteOffset === 0
&& bytes.byteLength === bytes.buffer.byteLength
) {
if (bytes.buffer instanceof ArrayBuffer && bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength) {
return bytes as Uint8Array<ArrayBuffer>;
}
const out = new Uint8Array(bytes.byteLength);