Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Add rule: No optional parameter in selectors #65

Closed
omackaj opened this issue Nov 7, 2019 · 3 comments · Fixed by #66
Closed

Add rule: No optional parameter in selectors #65

omackaj opened this issue Nov 7, 2019 · 3 comments · Fixed by #66
Labels
enhancement New feature or request selectors-format

Comments

@omackaj
Copy link

omackaj commented Nov 7, 2019

Selectors containing optional parameter i.e.: hello?: string throws an error.
It happens when memoized function was called with a different number of parameters than currently called instance.

@omackaj omackaj added the enhancement New feature or request label Nov 7, 2019
@jukben
Copy link
Contributor

jukben commented Nov 7, 2019

Thanks a lot! Great finding! The idea is thus forbid it by rule as a extension of https://github.com/productboardlabs/tslint-pb#selectors-format

Is it something what makes sense for you as well @Aldredcz?

@Aldredcz
Copy link
Contributor

Aldredcz commented Nov 7, 2019

Yea, definitely :)

@Aldredcz
Copy link
Contributor

Aldredcz commented Apr 1, 2020

Related: https://github.com/productboard/pb-frontend/pull/7480#pullrequestreview-385376735

Selectors containing optional parameter i.e.: title?: string throws an error.
It happens when memoized function was called with a different number of parameters than currently called instance.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request selectors-format
Development

Successfully merging a pull request may close this issue.

3 participants