Scope & Terms
Understand JavaScript syntax, builtins, and Web APIs before choosing a preset.
Three surfaces of JavaScript
JavaScript checks cover language syntax, builtins, and Web APIs. Use the examples below to find the settings your code needs.
JS syntax
- Examples: nullish coalescing (
a ?? b), optional catch binding, top-levelawait, and template literals. - What it is: ECMAScript operators and statements.
- How we detect it: mapped rules from
eslint-plugin-es-x, ESLint core, and this plugin. - Setup: mapped checks run in every preset.
The minimal preset also checks some builtins
configs.baseline() enables mapped rules, including checks for Temporal and Math.sumPrecise.
It leaves the separate Web API and JS builtin descriptor checks disabled.
JS builtins
- Examples:
Intl.Segmenter,Set.prototype.difference(), andIterator.prototype.join(). - What it is: the ECMAScript standard library: globals, classes, and methods.
- How we detect it: descriptors generated from web-features, plus the mapped checks above.
- Setup: both recommended presets enable
includeJsBuiltins.
Supported constructors, static methods, and globals can work without types. Instance-member descriptors use TypeScript type information to identify the receiver.
Web APIs
- Examples:
fetch,AbortSignal.any(),IntersectionObserver, andElement.animate(). - What it is: browser APIs for features such as the DOM, networking, media, and sensors.
- How we detect it: descriptors generated from web-features.
- Setup: both recommended presets enable
includeWebApis.
Use the TypeScript setup for supported instance-member checks, such as methods called on an element or response. See Quick Start to connect the parser.
Pick a preset
| Your setup | Start with |
|---|---|
| JavaScript | configs.recommended() |
| TypeScript with type information | configs['recommended-ts']() |
| JavaScript and TypeScript | Both recommended presets |
| Mapped rules without extra descriptor checks | configs.baseline() |
How coverage and runtime targets affect a check
Coverage is measured per feature ID. A mapped feature can still have unsupported access patterns or subfeatures, such as dynamic property access or aliases. The coverage report lists the available checks.
The plugin uses browser Baseline status from its bundled data. It does not select Node.js versions, worker environments, or custom browser targets.
Web API and built-in checks use the matched member's own status when web-features records one, so a member can be newer or older than the feature that groups it; only, ignore, and ignoreFeatures still take feature IDs.
ESLint's languageOptions.globals controls known global names; it does not change the Baseline policy.
The plugin does not account for polyfills or transpiler output. Test your app in its target environments.
Explore the coverage
See which features have mapped rules and which use descriptors. Use the report when you choose a policy or investigate a missing report.
Coverage
Mapped features and detection limits, at a glance
Last updated on