mirror of
https://github.com/selfxyz/self.git
synced 2026-01-10 07:08:10 -05:00
chore: address TypeScript ESLint v8 upgrade feedback and improve type safety (#895)
* cr feedback * update based on feedback * typing updates * unify yarn package version * update lock
This commit is contained in:
@@ -69,7 +69,6 @@ module.exports = {
|
||||
// TypeScript Rules - only essential ones
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'@typescript-eslint/ban-types': 'off',
|
||||
'@typescript-eslint/no-namespace': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
|
||||
|
||||
@@ -364,8 +364,8 @@
|
||||
"devDependencies": {
|
||||
"@types/js-sha1": "^0.6.3",
|
||||
"@types/node-forge": "^1.3.10",
|
||||
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
||||
"@typescript-eslint/parser": "^7.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
@@ -379,6 +379,7 @@
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"packageManager": "yarn@4.6.0",
|
||||
"engines": {
|
||||
"node": ">=22 <23"
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export function sha384_512Pad(
|
||||
prehash_prepad_m_array: number[],
|
||||
maxShaBytes: number
|
||||
): [number[], number] {
|
||||
let prehash_prepad_m: any = new Uint8Array(prehash_prepad_m_array);
|
||||
let prehash_prepad_m: Uint8Array = new Uint8Array(prehash_prepad_m_array);
|
||||
// Length in bits before padding
|
||||
const length_bits = prehash_prepad_m.length * 8;
|
||||
|
||||
@@ -84,7 +84,7 @@ export function sha384_512Pad(
|
||||
// Copied from zk-email cuz it uses crypto so can't import it here.
|
||||
// Puts an end selector, a bunch of 0s, then the length, then fill the rest with 0s.
|
||||
export function shaPad(prehash_prepad_m_array: number[], maxShaBytes: number): [number[], number] {
|
||||
let prehash_prepad_m: any = new Uint8Array(prehash_prepad_m_array);
|
||||
let prehash_prepad_m: Uint8Array = new Uint8Array(prehash_prepad_m_array);
|
||||
const length_bits = prehash_prepad_m.length * 8; // bytes to bits
|
||||
const length_in_bytes = int64toBytes(length_bits);
|
||||
prehash_prepad_m = mergeUInt8Arrays(prehash_prepad_m, int8toBytes(2 ** 7)); // Add the 1 on the end, length 505
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"moduleResolution": "NodeNext",
|
||||
"types": ["node"],
|
||||
|
||||
"baseUrl": "./",
|
||||
"composite": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user