Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESLint rule for BN imports #197

Merged
merged 5 commits into from
Sep 20, 2024

Conversation

tatomir-streamflow
Copy link
Contributor

@tatomir-streamflow tatomir-streamflow commented Sep 11, 2024

  • Added ESLint rule to prevent bn.js imports
  • pre-commit hook no longer converts BN to BigNumber, now the script can be manually run like npm run convert-bn to run on all files under packages or you can specify the folders e.g npm run convert-bn -- packages/stream/solana
  • Fixed missing .js extension in exports

"error",
{
name: "bn.js",
message: "We no longer use BN.js for big number calculations. Switch to using bignumber.js instead. Run npm run convert-bn to automatically switch BN to BigNumber in all folders"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we use pnpm maybe we can stick to it?

@@ -1 +1 @@
export * as StreamflowDistributorSolana from "./solana";
export * as StreamflowDistributorSolana from "./solana/index.js";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you said you were planning to migrate scoped exports here, do I miss anything here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave up on that - there are issues with v7 even with that, right now I paused that work in favour of more prio work (aligned unlocks/airdrops)

@tatomir-streamflow tatomir-streamflow merged commit 1f0ce4e into v7 Sep 20, 2024
2 checks passed
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants