Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create custom rules for Eslint around ConceptAs #32

Open
woksin opened this issue Jul 15, 2020 · 2 comments
Open

Create custom rules for Eslint around ConceptAs #32

woksin opened this issue Jul 15, 2020 · 2 comments

Comments

@woksin
Copy link
Contributor

woksin commented Jul 15, 2020

No description provided.

@jakhog
Copy link

jakhog commented Jul 15, 2020

@jakhog
Copy link

jakhog commented Jul 15, 2020

We should have rules that:

  1. Checks that the second parameter to a ConceptAs<,> definition is a string, with the same value as the name of the type. So, type ReasonId = ConceptAs<Guid, 'ReasonId'> is valid, but type ReasonId = ConceptAs<Guid, 'FilterId'> or type ReasonId = ConceptAs<Guid, 2> is not.
  2. Checks that ConceptAs<,> types should not be used on either sign of an equality comparison === == != !== (and possibly others).
  3. Checks that ConceptAs<,> types are not used as parameters in Map<,> and Set<> (and possibly others).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants