mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-23 14:55:35 +03:00
Document withModuleVisitor
This commit is contained in:
parent
5f7bf971c4
commit
c2ce950f4f
@ -983,8 +983,20 @@ fromProjectRuleSchema (ProjectRuleSchema schema) =
|
||||
)
|
||||
|
||||
|
||||
{-| TODO Documentation
|
||||
Mention [`withContextFromImportedModules`](#withContextFromImportedModules)
|
||||
{-| Add a visitor to the [`ProjectRuleSchema`](#ProjectRuleSchema) which will
|
||||
visit the project's Elm modules.
|
||||
|
||||
A module visitor behaves like a module rule, except that it won't visit the
|
||||
project files, as that is already done by other visitors for project rules (such
|
||||
as [`withElmJsonProjectVisitor`](#withElmJsonProjectVisitor)).
|
||||
|
||||
`withModuleVisitor` takes a function that takes an already initialized module
|
||||
rule schema and adds visitors to it, using the same functions as for building a
|
||||
[`ModuleRuleSchema`](#ModuleRuleSchema).
|
||||
|
||||
When you use `withModuleVisitor`, you will be required to use [`withModuleContext`](#withModuleContext),
|
||||
in order to specify how to create a `moduleContext` from a `projectContext` and vice-versa.
|
||||
|
||||
-}
|
||||
withModuleVisitor :
|
||||
(ModuleRuleSchema {} moduleContext -> ModuleRuleSchema { a | hasAtLeastOneVisitor : () } moduleContext)
|
||||
|
Loading…
Reference in New Issue
Block a user