Provides elm-review
rules to detect errant elm ports.
NoDuplicatePorts
- Ensure that port names are unique across your project.NoUnsafePorts
- Forbid unsafe types in ports.NoUnusedPorts
- Ensure that all defined ports have been used.
import NoDuplicatePorts
import NoUnsafePorts
import NoUnusedPorts
import Review.Rule exposing (Rule)
config : List Rule
config =
[ NoDuplicatePorts.rule
, NoUnsafePorts.rule NoUnsafePorts.any
, NoUnusedPorts.rule
]
You can try the example configuration above out by running the following command:
elm-review --template sparksp/elm-review-ports/example