# JavaScript and TypeScript

> Documentation index: https://frontend-tools.coherent-labs.com/llms.txt lists every page of this documentation as Markdown; the full text is in https://frontend-tools.coherent-labs.com/llms-full.txt.

Source: https://frontend-tools.coherent-labs.com/eslint-plugin-gameface/guides/javascript/

Scripts can call APIs that Gameface does not provide/support. The plugin flags **obvious** unsupported usage in `.js`, `.jsx`, `.ts`, and `.tsx` files.

## What you will see

- **Errors** for globals Gameface does not support (for example some browser-only APIs used as bare identifiers)
- **Warnings** for partial APIs—`Something.member` where `member` is known to be missing on that type in Gameface

These are **static** checks. They help during development but do not replace testing in the actual Gameface runtime.

## Examples of patterns that may not be reported

- `obj.chrome` or other property access through a variable
- `globalThis['Chrome']` with a computed name
- Code paths only reachable at runtime

**Note:** TypeScript files are linted without full type information from your `tsconfig`, so the plugin does not use the TypeScript compiler to prove a global exists.

## If a warning is wrong for your build

Some projects polyfill or inject globals at runtime. You can lower severity or disable the rule for that file pattern:

```js
{
  files: ["src/legacy/**/*.js"],
  rules: {
    "gameface/js-no-unsupported-globals": "off",
  },
},
```

See Rules reference for rule ids.
