bitcoinjs-lib
bitcoinjs-lib copied to clipboard
Implemented Eslint to remove deprecated Tslint
Summary
- Created .eslintrc to match previous rules
- Made eslint/prettier work together
- ran lint on src, ts_src and test
- made sure all existing tests pass
This is rather a monster PR, let me know, happy to iterate on it, or if there's no interest it's ok to close it too.
You will likely want to match the current tslint config rules ("arrow-parens": false for example) to keep the diff as small as possible. Then make subsequent PR's to add whatever linting rule changes you'd like.
Concept ACK
You will likely want to match the current tslint config rules ("arrow-parens": false for example) to keep the diff as small as possible. Then make subsequent PR's to add whatever linting rule changes you'd like.
I agree with John here.
- Concept ACK
- I want to merge and release taproot first (so that @motorina0 won't have to deal with all the merge conflicts)
Out of office. I will try to wrap-up the taproot PR by the end of next week. Thanks!
On Thu, Sep 1, 2022, 11:49 PM Jonathan Underwood @.***> wrote:
You will likely want to match the current tslint config rules ("arrow-parens": false for example) to keep the diff as small as possible. Then make subsequent PR's to add whatever linting rule changes you'd like.
I agree with John here.
- Concept ACK
- I want to merge and release taproot first (so that @motorina0 https://github.com/motorina0 won't have to deal with all the merge conflicts)
— Reply to this email directly, view it on GitHub https://github.com/bitcoinjs/bitcoinjs-lib/pull/1831#issuecomment-1234817107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWQR3RAN3DOSGFOEDHZ7STV4EQFTANCNFSM57YCYCPQ . You are receiving this because you were mentioned.Message ID: @.***>
sounds good, I'll wait for taproot merge,
arrow-parens
funny enough :sweat_smile: , this one caused an interesting conflict between es-lint and prettier, since prettier recommends here to have it enabled.
But I absolutely understand the impact, will iterate on it to minimize risk
Sorry for the big diff!
Merged taproot. Please rebase and I'll merge this. Thanks!
hi @junderw did a rebase and pushed, here's a few notes since it's still affecting so many files
- With ESlint rules I could pretty much mirror old tslint rules.
- When applying Prettier rules ontop of eslint, I could not mirror them 😞 , since Prettier is highly opinionated, things like multiple imports/exports per line, or extra spaces [..] vs [....] throw errors and Prettier devs didnt give us a disable flag, so I had to jump in and fix formatting on a few files.
let me know what you think, Im happy to continue iterating on it
edit: FYI, I also updated the package-lock deps after upgrading prettier and installing eslint, and did run snyk test on the project locally with no vulnerabilities found