mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 08:05:46 +03:00
20 lines
606 B
Elm
20 lines
606 B
Elm
module No_WithModuleContext_Without_WithModuleVisitor exposing (rule)
|
|
|
|
{-| We want to forbid using `Rule.withModuleContext` when `withModuleVisitor` has
|
|
not been used.
|
|
-}
|
|
|
|
import Review.Rule as Rule exposing (Rule)
|
|
|
|
|
|
rule : Rule
|
|
rule =
|
|
Rule.newProjectRuleSchema "No_WithModuleContext_Without_WithModuleVisitor" ()
|
|
|> Rule.withModuleContext
|
|
{ fromProjectToModule = \_ _ () -> ()
|
|
, fromModuleToProject = \_ _ () -> ()
|
|
, foldProjectContexts = \_ () -> ()
|
|
}
|
|
|> Rule.withFinalProjectEvaluation (\_ -> [])
|
|
|> Rule.fromProjectRuleSchema
|