Skip to content
SiteEmail

Configuration

Add this to eslint.config.js in your project root:

import gameface from "eslint-plugin-gameface";
export default [
{ ignores: ["**/node_modules/**", "dist/**"] },
...gameface.configs["flat/recommended"],
];

That preset turns on Gameface checks for:

FilesExamples of what is checked
*.htmlUnsupported tags, data-bind-*, <style> and style=""
*.css, *.scssUnsupported properties, selectors, functions
*.js, *.jsxUnsupported globals; JSX adds data binding and inline styles
*.ts, *.tsxSame as JS/JSX

Adjust ignores to match your build output folders.

If you use Gameface model JSON files, point ESLint at the folder so bindings can be validated against real model fields:

export default [
...gameface.configs["flat/recommended"],
{
settings: {
gameface: {
modelsDir: "Gameface-models",
},
},
},
];

modelsDir is resolved from the directory where you run ESLint (usually the project root). Change it if your models live elsewhere.

If your project uses extra data-bind-* attribute names, allow them so spelling rules do not report false positives:

settings: {
gameface: {
customDataBindAttributes: ["data-bind-my-feature"],
},
},

Only set this when your project actually depends on that version’s support tables. Most teams can leave the default.

Add a rules block after the preset. Use "off", "warn", or "error"; some rules also accept options:

export default [
...gameface.configs["flat/recommended"],
{
rules: {
"gameface/html-partial-features": "off",
"gameface/js-partial-member-access": "warn",
"gameface/html-parsed-no-impl": [
"error",
{ scope: "all", ignoreTags: ["meta", "link"] },
],
},
},
];

See Configure rules and the full rule list with descriptions and defaults.

gameface/css-no-unsupported-properties only reports properties Gameface does not support. Your editor may still underline coh-* or other vendor properties as “unknown” from VS Code CSS validation, not from this plugin.

To reduce noise:

  • Add VS Code css.customData for Gameface specific properties, or
  • Relax editor CSS lint settings for Gameface stylesheets.