productboardlabs / tslint-pb

📄 (DEPRECATED) Our own custom TSlint rules. What has been seen, cannot be unseen.
MIT License
5 stars 0 forks source link

fix: Support of new `select` API for all rules #68

Closed Aldredcz closed 4 years ago

Aldredcz commented 4 years ago

After merging the rfc: Objects as arguments in selectors, I updated the selectors-format rule to match the new select API.

Unfortunately, I missed another two rules, which work with select, resulting in insufficient linting. Reported by @tomsvob: https://github.com/productboard/pb-frontend/pull/7914#discussion_r419274033

In this PR I am implementing the support of the new select API for these 2 remaining lint rules.

Also, I introduced utils/connectUtils and utils/selectUtils to unify some common logic of detecting connect/select CallExpressions.


And also there are quite a lot of syntax changes, as I ran prettier on the existing files, which were not prettified before.

💡Idea: Let's introduce official prettier support for this repo? Edit: I see we already track this (https://github.com/productboardlabs/tslint-pb/issues/51)

jukben commented 4 years ago

Awesome, thanks for it and also for extending test suit case. 💪