rule : Review.Rule.Rule
Reports the use of Html.Attributes.class
, Html.Attributes.classList
and
Svg.Attributes.class
.
config =
[ ZenCss.NoHtmlClasses.rule
]
import Html exposing (Html)
import Html.Attributes as Attributes
main : Html msg
main =
Html.div [ Attributes.class "container" ]
[ Html.text "Hello!" ]
import CSS.Attributes
import Classes
import Html exposing (Html)
main : Html msg
main =
Html.div [ CSS.Attributes.class Classes.container ]
[ Html.text "Hello!" ]
This rule is useful when using the elm-zen-css
library.
This rule is not useful when references to CSS classes are still required.
You can try this rule out by running the following command:
elm-review --template decioferreira/elm-review-zen-css/example --rules ZenCss.NoHtmlClasses