rule : Options -> Review.Rule.Rule
Reports if you are using classes in your Html that are not known to postcss.
config =
[ TailwindCss.NoUnknownClasses.rule { order = classOrder, checkedFunctions = [checkClassFunction] }
]
It is not recommended to define the `order` option manually. Instead you can use the [postcss-plugin](https://www.npmjs.com/package/elm-review-tailwindcss-postcss-plugin)
to generate the Elm code for you and then you can just import the `classOrder` in your `ReviewConfig.elm` file.
a =
class "flex absolute unknown-class"
a =
class "flex absolute"
This rule is useful when you are using tailwindcss and all your styles are known at build-time. This rule is not useful when you are not using tailwindcss, or you have stylesheets in your application that are injected at runtime.
You can try this rule out by running the following command:
elm-review --template anmolitor/elm-review-tailwindcss/example --rules TailwindCss.NoUnknownClasses
{ order : Dict String Basics.Int
, checkedFunctions : List TailwindCss.CheckedFunction.CheckedFunction
}
Options for the NoUnknownClasses rule.
order: should be generated from the postcss plugin
checkedFunctions: a list of function calls to check for unknown class usages
defaultOptions : { order : Dict String Basics.Int } -> Options
Provide required options and defaults the other options