Baseline Logoeslint-plugin-baseline-js

Scope & Terms

What this plugin checks and how JS Syntax vs JS Builtins vs Web APIs.

Three surfaces of JavaScript

When we say “JavaScript”, we actually mean one of three surfaces. Knowing the difference makes configuration and detection much easier.

JS Syntax

  • Examples: nullish coalescing (a ?? b), optional catch binding, top‑level await, template literals
  • What it is: ECMAScript language syntax (operators, statements)
  • How we detect: delegate to community rules (eslint-plugin-es-x), ESLint core, and a few internal rules
  • In this plugin: always in scope, even with the “syntax only” setup

JS Builtins

  • Examples: BigInt64Array, Intl.Segmenter, Temporal, Math.sumPrecise (proposal)
  • What it is: the standard library (globals, namespaces, classes, methods)
  • How we detect: data‑driven (web‑features “JSBI” descriptors). Works without types for most patterns
  • In this plugin: enabled in recommended presets (includeJsBuiltins: { preset: 'auto' })

Web APIs

  • Examples: fetch, AbortSignal.any(), IntersectionObserver, Element.animate()
  • What it is: browser/host APIs (DOM, WebGL, media, sensors, …)
  • How we detect: data‑driven (web‑features API descriptors). Instance methods benefit from type info
  • In this plugin: enabled in recommended presets (includeWebApis: { preset: 'auto' }, or type‑aware for TS)

Extras

For detection mechanics and overall coverage, see the Coverage report.

Coverage

What’s covered, at a glance

Last updated on