Skip to content
SiteEmail

Gameface data binding attributes are easy to mistype. The plugin flags common mistakes in HTML and JSX before you load the page in the engine.

ProblemExampleNotes
Unknown attribute namedata-bind-typo="{{Model.name}}"
Missing {{ }}data-bind-value="Model.name"
Broken model pathdata-bind-value="{{Model.}}"Configure the path to your mock models folder first so the linter is able to validate their usage in the data-bind-* attributes!
Invalid bind-forSemicolon or wrong iterator syntax
Wrong class toggle formatMissing class:{{condition}} pattern
Unknown model fieldPath does not exist in your model JSON

Models validation compares bindings to JSON files in your models folder:

settings: {
gameface: {
modelsDir: "Gameface-models",
},
},

Projects sometimes add proprietary data-bind-* names. Register them so they are not reported as spelling errors:

settings: {
gameface: {
customDataBindAttributes: ["data-bind-custom-widget"],
},
},

HTML files use gameface/html-databind-* rules. React/Solid-style components use the matching gameface/jsx-databind-* rules on the opening tag.

If you previously used HTMLLint plugin for the same checks, you can move those workflows to ESLint with the preset above and the same modelsDir / customDataBindAttributes settings you used in .cohtmllintrc.