cosmjs
cosmjs copied to clipboard
fix cyclical dependencies
eslint-plugin-import 2.27+ warns about these:
[@cosmjs/stargate]:
[@cosmjs/stargate]: cosmjs/packages/stargate/src/index.ts
[@cosmjs/stargate]: 6:1 warning Dependency cycle via ./distribution/aminomessages:29 import/no-cycle
[@cosmjs/stargate]:
[@cosmjs/stargate]: cosmjs/packages/stargate/src/modules/distribution/aminomessages.ts
[@cosmjs/stargate]: 10:1 warning Dependency cycle via ./modules:107 import/no-cycle
[@cosmjs/stargate]:
[@cosmjs/stargate]: cosmjs/packages/stargate/src/modules/index.ts
[@cosmjs/stargate]: 19:1 warning Dependency cycle via ../..:10 import/no-cycle
[@cosmjs/stargate]:
[@cosmjs/stargate]: cosmjs/packages/stargate/src/modules/staking/aminomessages.ts
[@cosmjs/stargate]: 15:1 warning Dependency cycle via ./modules:107 import/no-cycle
[@cosmjs/stargate]:
[@cosmjs/stargate]: cosmjs/packages/stargate/src/signingstargateclient.ts
[@cosmjs/stargate]: 27:1 warning Dependency cycle via ./distribution/aminomessages:29=>../..:10 import/no-cycle
[@cosmjs/stargate]:
[@cosmjs/stargate]: cosmjs/packages/stargate/src/stargateclient.ts
[@cosmjs/stargate]: 14:1 warning Dependency cycle via ./distribution/aminomessages:29=>../..:10 import/no-cycle
[@cosmjs/stargate]:
[@cosmjs/stargate]: ✖ 6 problems (0 errors, 6 warnings)
[@cosmjs/stargate]:
[@cosmjs/stargate]: ESLint found too many warnings (maximum: 0).
I would consider this low priority. Cyclical dependencies inside of a package are not the most beautiful thing in the world but also not an issue at all. This is well supported and common in many other languages where the whole module is preprocessed into a single file before compilation. Disabling import/no-cycle is good.