Closed AntonioVentilii-DFINITY closed 1 month ago
Will it be easy to introduce in oisy-wallet-signer
?
I checked and not really... quite a lot of fixes. We can either disable for that one, or since it may be opinionated (maybe some projects prefer relative imports), we just don't add it, and I add it just in Oisy
It would be nice to have it as an option. Generally speaking it would be nice, as you already suggested, to allow consumer to opt-out certains rules if they wish. This way we can have this rule for example and use it in Oisy and, to get started, not in the library?
Alternatively, if npm run lint --fix
fixes all issues, I'm not against running it on the signer and enforcing the rule. The signer lib is well covered by test.
I just double checked oisy-wallet-signer
and there would be only two conflicts, so let's merge this already.
We introduce the rule no-relative-parent-imports that enforces the usage of absolute imports or aliases, but only if it refers to parent peers.
To completely avoid relative imports, we create a custom rule that simply check the import string.