Open lue-bird opened 11 months ago
This is intentional yes, people should write a project rule instead. I usually remember the reason, but for some reason I can't put my finger on it now :disappointed_relieved:
If you do remember the reason some future time by chance, it would be nice to add the reason to the documentation of newModuleRuleUsingContextCreator
.
Review.Rule.newModuleRuleSchema
allows adding for example awithElmJsonModuleVisitor
. However,newModuleRuleSchemaUsingContextCreator
cannot be used with that visitor because the resulting schema doesn't have the phantom fieldcanCollectProjectData : ()
.As far as I can see, it is not possible to access the
Elm.Project.Project
/ElmJsonKey
using aContextCreator
or any other method.First, is this intentional somehow? Converting it to a project rule seems easy enough (and the result is probably nicer anyway). And if not, should we add the phantom field in v3? Or would it be nicer to introduce something like
withElmJson
etc for theContextCreator
?