Skip to content

linter: Add agent formatter and auto-enable when used by AI agent #20514

@camchenry

Description

@camchenry

This issue proposes adding a new agent formatter that contains as few tokens as necessary to accomplish communicating the same information. That means it is not intended for human consumption, but to be read by a machine (like AI). That probably means something like:

  • Minimal code rendering (e.g., context lines), maybe even none at all
  • Includes diagnostic help text, labeling, error messages
  • De-duplicated filenames or at least truncated somewhat
  • No fancy unicode characters to draw lines or boxes

Then, once we have the new formatter available, we automatically enable it if we detect that oxlint is being used by an AI agent. We can probably copy some of this logic from https://github.com/unjs/std-env, which is used by Vitest.

Prior art

Metadata

Metadata

Assignees

Labels

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions