You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create custom rules for Eslint around ConceptAs #32
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.
Checks that ConceptAs<,> types should not be used on either sign of an equality comparison =====!=!== (and possibly others).
Checks that ConceptAs<,> types are not used as parameters in Map<,> and Set<> (and possibly others).
Activity
jakhog commentedon Jul 15, 2020
See https://eslint.org/docs/developer-guide/working-with-rules
jakhog commentedon Jul 15, 2020
We should have rules that:
ConceptAs<,>definition is a string, with the same value as the name of the type. So,type ReasonId = ConceptAs<Guid, 'ReasonId'>is valid, buttype ReasonId = ConceptAs<Guid, 'FilterId'>ortype ReasonId = ConceptAs<Guid, 2>is not.ConceptAs<,>types should not be used on either sign of an equality comparison=====!=!==(and possibly others).ConceptAs<,>types are not used as parameters inMap<,>andSet<>(and possibly others).