dfinity / eslint-config-oisy-wallet

Shared ESLint configurations from the Oisy Wallet team
Apache License 2.0
2 stars 0 forks source link

feat: more array functions exceptions for prefer-object-params #15

Closed peterpeterparker closed 1 month ago

peterpeterparker commented 1 month ago

In the signer standards lib I got following warning:

/Users/daviddalbusco/projects/dfinity/oisy-wallet-signer/src/icp-wallet.ts 104:53 warning Functions with more than one parameter should accept an object and use destructuring local-rules/prefer-object-params

I think it's because I use every which is not yet whitelisted

const uint8ArrayEqual = ({first, second}: {first: Uint8Array; second: Uint8Array}): boolean =>
      first.length === second.length && first.every((value, index) => value === second[index]);

Therefore I thought about adding more functions to the list of exception of prefer-object-params.