Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion apps/oxlint/src-js/package/rule_tester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,21 @@ interface Config {
/**
* ESLint compatibility mode.
*
* Useful if moving test cases over from ESLint's `RuleTester` to Oxlint's.
* It is recommended to only use this option as a temporary measure and alter the test cases
* so `eslintCompat` is no longer required.
*
* If `true`:
* - Column offsets in diagnostics are incremented by 1.
* - Fixes which are adjacent to each other are considered overlapping, and only the first fix is applied.
* - Defaults `sourceType` to "module" if not provided (otherwise default is "unambiguous").
* - Disallows `sourceType: "unambiguous"`.
* - Allows `null` as property value for `globals`.
* `globals: { foo: null }` is treated as equivalent to `globals: { foo: "readonly" }`.
* ESLint accepts `null`, though this is undocumented. Oxlint does not accept `null`.
* - Slightly different behavior when `report` is called with `loc` of form `{ line, column }`.
*
* Both these match ESLint's behavior.
* All of these match ESLint `RuleTester`'s behavior.
*/
eslintCompat?: boolean;

Expand Down
Loading