Skip to content

[FEATURE] Templ support #439

@AdamVig

Description

@AdamVig

I'd like to use this plugin to lint HTML in Templ files, for example:

package main

templ Hello(name string) {
  <div>Hello, { name }</div>
}

templ Greeting(person Person) {
  <div class="greeting">
    @Hello(person.Name)
  </div>
}

Templ resources: https://github.com/a-h/templ / https://pkg.go.dev/github.com/a-h/templ

It almost works if I omit parserOptions.templateEngineSyntax, but, for example, it gets stuck on id={ myIdVariable } when @html-eslint/id-naming-convention is enabled.

I am going to try to implement this myself—just wanted to start a conversation here in case anyone is already thinking about this.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions