leojpod/review-no-empty-html-text - version: 1.0.2

for more information visit the package's GitHub page

Package contains the following modules:

No-empty-html-text

What is it?

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, ...)

Why should you use it?

Why should you not use it?

Example configuration

import NoEmptyText
import Review.Rule exposing (Rule)

config : List Rule
config =
  [ NoEmptyText.rule
  ]