Skip to content

anmolitor/elm-review-tailwindcss

Repository files navigation

elm-review-tailwindcss

Provides elm-review rules to use when you primarily use TailwindCSS to style your Elm application.

Provided rules

Configuration

module ReviewConfig exposing (config)

import Review.Rule exposing (Rule)
import TailwindCss.ConsistentClassOrder
import TailwindCss.NoCssConflict
import TailwindCss.NoUnknownClasses
-- Note that this module is not provided! You have to generate the module yourself using postcss and our postcss-plugin.
import TailwindCss.ClassOrder exposing (classOrder)

config : List Rule
config =
    [ TailwindCss.ConsistentClassOrder.rule (TailwindCss.ConsistentClassOrder.defaultConfig classOrder)
    , TailwindCss.NoCssConflict.rule
    , TailwindCss.NoUnknownClasses.rule (TailwindCss.NoUnknownClasses.defaultConfig classOrder)
    ]

Try it out

You can try the example configuration above out by running the following command:

elm-review --template anmolitor/elm-review-tailwindcss/example

About

Useful linting rules for Elm Projects using TailwindCSS

Resources

License

Stars

Watchers

Forks

Packages

No packages published