Skip to main content

Runtime - Browser

Declare the standard browser globals for JavaScript and TypeScript that runs in a web page. The layer supplies names such as window, document, and navigator without changing Nova's language or code-style rules.

Usage

Spread runtimeBrowser after the language layers and before tool-specific layers.

eslint.config.mts
ts
import {
  dxCodeStyle,
  dxIgnore,
  langTypescript,
  runtimeBrowser,
} from '@cbnventures/nova/presets/eslint';

export default [
  ...dxIgnore,
  ...dxCodeStyle,
  ...langTypescript,
  ...runtimeBrowser,
];

What This Preset Configures

The preset applies the globals package's browser environment to JavaScript, JSX, TypeScript, TSX, MJS, and MTS files. It intentionally does not add Node.js globals; configuration files that run in Node should use a separate scoped runtime or tool layer.