FAQ
Find the right setup and troubleshoot missing or unexpected reports.
Start with the checks below. If you still need help, open a GitHub issue with your configuration and a small code sample.
Why is an API not reported?
- Check the file scope.
recommendedcovers JavaScript;recommended-tscovers.tsand.tsx. - Enable the detector. The
baselinepreset leaves Web API and JS builtin descriptor checks disabled. - Connect type information. Instance-member descriptors need a configured TypeScript parser and declarations for the member.
- Check the policy and coverage. Reports need a matching detector and a feature that exceeds your Baseline threshold.
Switch from the minimal preset to recommended
Replace the baseline entry with recommended to enable additional Web API and JS builtin checks for JavaScript:
import baselineJs, { BASELINE } from "eslint-plugin-baseline-js";
export default [
{ plugins: { "baseline-js": baselineJs } },
baselineJs.configs.recommended({ available: BASELINE.WIDELY }),
];For TypeScript, use recommended-ts and configure the parser as shown in Quick Start.
The settings look right, but the report is still missing
Check the coverage report for a matching rule or descriptor.
Dynamic property names and aliases are not tracked. Bare Window attribute reads and bare Window function references are also outside the current detectors. For example, window.cookieStore has a descriptor, while cookieStore alone does not.
Event names in addEventListener(...) or handler assignments such as onbeforeunload do not have general detection. Option values and behavioral subfeatures need their own descriptors.
For typed checks, confirm that the receiver's type contains the member.
Missing declarations or any types can prevent a report.
Does type-aware fail when types are missing?
No. The plugin keeps other checks active and skips instance-member and typedOnly descriptors when parser type information is missing.
Check the parser project
The parser can report an error if a file is outside its TypeScript project.
Include the file in tsconfig.json or adjust the config's files scope.
Can I use oxlint?
Yes, through its JS plugin support. See Use with oxlint for a complete config.
Checks that need TypeScript parser services do not run there.
Use ESLint with a configured TypeScript parser for checks such as Set.prototype.difference() and Iterator.prototype.join().
The linter compatibility report shows observed results for specific releases, with the inputs and output for each case.
How do I handle a false positive or an exception?
Typed instance checks match interface names and inheritance. A project-defined type with the same name as a Web API interface can produce a false positive.
Use ignoreFeatures for a specific web-features ID.
Use ignoreNodeTypes when you need to suppress reports on an ESTree node type.
Add a feature exception
Copy the value after Feature ID: from the report, without the final period. For example, Feature ID: iterator-join. identifies iterator-join.
Keep your existing options and add the ID to ignoreFeatures:
{
available: "widely",
includeWebApis: { preset: "auto" },
includeJsBuiltins: { preset: "auto" },
ignoreFeatures: ["iterator-join"],
}Record why your project allows the feature, such as a tested polyfill or fallback. The plugin does not verify that exception's runtime behavior.
Match several features or report node types
ignoreFeatures and ignoreNodeTypes accept exact strings or regex patterns:
ignoreFeatures: ["nullish-coalescing", "/^iterator-/"],
ignoreNodeTypes: ["WithStatement", "/Expression$/"],Regex strings must start and end with /. Flags such as /pattern/i are not supported.
The only and ignore lists inside include options accept exact feature IDs only.
How do I combine presets or start with warnings?
Recommended presets configure this plugin's rule and file patterns.
Register the plugin under 'baseline-js', then add your parser and other rule configs as needed.
Use flat config objects with files and ignores to scope changes.
Start with warnings during rollout
Pass level: "warn" to keep the preset's detection options and lower its severity:
import baselineJs from "eslint-plugin-baseline-js";
export default [
{ plugins: { "baseline-js": baselineJs } },
baselineJs.configs.recommended({
available: "widely",
level: "warn",
}),
];Switch to "error" when the project is ready to enforce the policy.
Why does the status differ from today's Baseline data?
The plugin bundles a fixed web-features snapshot. A newer release may include updated data and detectors. Linting does not download data or advance availability dates.
Does it account for polyfills or Node.js versions?
The plugin checks source code against browser Baseline data. It does not inspect polyfills, transpiler output, or runtime feature guards. Setting ESLint globals does not change that policy.
Use a narrow exception after you verify support for your targets. See Configuration for all options.
Last updated on