for more information visit the package's GitHub page
Package contains the following modules:
This is a simple rule for the elm-review
tool that will flag the use of the Html.text
function as a mean to show nothing. It is quite often the case that we see the following pattern in elm code:
if a then
viewA a
else
text ""
However, there is the quite nice elm-community/html-extra
package that provide utility functions to "replace" those text ""
by an alias nothing
or by some other utility functions (e.g viewIf
, viewMaybe
, ...)
html-extra
on an already existing project chances are that you've plenty of text ""
dispersed across many files. Setting up elm-review and using this rule would be a good way to find and fix them all.html-extra
but you'd like to make sure that newcomers will get directed to the proper doc when they start on your project, this is also a good option.text ""
in your code.html-extra
.elm-review
.import NoEmptyText
import Review.Rule exposing (Rule)
config : List Rule
config =
[ NoEmptyText.rule
]