yearn / yearn-sdk

🦧 SDK for the yearn.finance platform. WIP
https://npm.im/@yfi/sdk
MIT License
53 stars 56 forks source link

fix: Most lint issues across the codebase #251

Closed karelianpie closed 2 years ago

karelianpie commented 2 years ago

Our lint was not catching some important issues, improved a little bit the .eslintrc to give us a bit more. Furthermore, added tsc --noEmit because typescript-eslint at the moment does not report compiler errors

Apologies about the number of files changed 🙇

github-actions[bot] commented 2 years ago

size-limit report 📦

Path Size
dist/sdk.cjs.production.min.js 43.18 KB (+0.06% 🔺)
dist/sdk.esm.js 43.46 KB (+0.17% 🔺)
xgambitox commented 2 years ago

We have some conflicts now that another PR was merged, so lets try to send this one next since it touches a lot of files.

karelianpie commented 2 years ago

We have some conflicts now that another PR was merged, so lets try to send this one next since it touches a lot of files.

@xgambitox fixed the merge conflicts with https://github.com/yearn/yearn-sdk/pull/251/commits/33cb5d41d5681fdfd2e0c6b757a46f4cd497826c

Had to change a little bit the logic, a couple of tests were returning falsy values. Lint does not really like the bang operator, and for good reason, it can be really dangerous. So I've addressed that by just throwing an error instead.

Screen Shot 2022-03-19 at 10 01 02 am