-
Notifications
You must be signed in to change notification settings - Fork 168
Description
We can lint these things:
-
Use
maud::DOCTYPEinstead ofPreEscaped("<!DOCTYPE html>") -
Rather than writing
output.push_str(&html! { ... }.into_string()), just implement therendermethod instead -
Use
format_args!(or list the values individually) instead offormat!
The following lints inspect the structure of the template itself. It's not clear yet how they can be implemented under the current design. We'll probably need to do some refactoring before these can work.
-
Use
.fooinstead ofclass="foo", and#fooinstead ofid="foo"- Use
.foo[bar]instead ofclass=@if bar { "foo" }
- Use
-
Warn against
a target="..."withoutrel="noopener" -
Warn against dynamic data in CSS and JS contexts, e.g.
script { "var name = '" (user.name) "'" } -
Warn about non-standard elements and attributes
Further suggestions welcome!