rule : Review.Rule.Rule
Reports the use of Html.Attributes.style
and Svg.Attributes.style
.
config =
[ ZenCss.NoHtmlStyles.rule
]
import Html exposing (Html)
import Html.Attributes as Attributes
main : Html msg
main =
Html.div [ Attributes.style "color" "blue" ]
[ 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 inline style attributes 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.NoHtmlStyles