web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Stop using exports like `export * from "./somefile"`

Open Muhammad-Altabba opened this issue 2 years ago • 2 comments
trafficstars

Discuss and possibly implement the following suggestion: https://github.com/web3/web3.js/pull/5771#issuecomment-1408396222

"... I noticed is that every package has indexed with exports like export * from "./somefile", I think it's a bad practice because:

  • if you are exporting everything from every file, every change is gonna be breaking change - maybe consider exporting only stuff that developers or you actually need
  • if the developer is searching for the source code of some imported class, it's gonna be a nightmare because it could be in any of these files so you can't just ctrl+click to dig through source code

Originally posted by @mpetrunic in https://github.com/web3/web3.js/issues/5771#issuecomment-1408396222

Muhammad-Altabba avatar Jan 30 '23 23:01 Muhammad-Altabba