Oxlint
Run Baseline checks through Oxlint's JavaScript plugin support.
Oxlint can load this package through its JavaScript plugin support.
Configure the rule directly in .oxlintrc.json. The exported config helpers are for ESLint flat config.
The linter compatibility report records the versions, cases, and observed results for ESLint, Oxlint, and Bun.
Install
pnpm add -D oxlint eslint-plugin-baseline-jsConfigure
Add the plugin and its rule to your config. The green lines show where to start:
{
"jsPlugins": ["eslint-plugin-baseline-js"],
"rules": {
"baseline-js/use-baseline": [
"warn",
{
"available": "widely",
"includeWebApis": { "preset": "auto" },
"includeJsBuiltins": { "preset": "auto" }
}
]
}
}Run the linter:
pnpm exec oxlint .Need instance-member checks?
Use the ESLint TypeScript setup for checks such as Set.prototype.difference().
Oxlint runs the supported checks that do not need TypeScript parser services.
Type information and Oxlint support
Oxlint's JavaScript plugins do not provide the TypeScript parser services this plugin uses.
The rule can check mapped syntax and built-ins, plus supported global constructors and static API calls.
It skips instance member checks that need type information, such as Set.prototype.difference and iterator helper methods.
Setting preset: 'type-aware' or enabling Oxlint's own type-aware rules does not provide those parser services to this plugin.
Use the ESLint TypeScript setup when you need these checks.
JavaScript plugin support in Oxlint is still in alpha. Check the upstream limitations when upgrading.
Last updated on