Skip to content

☂️ Oxlint JS Plugins Milestone 2 #14826

@overlookmotel

Description

@overlookmotel

First version of Oxlint JS plugins is out in the wild 🎉 ! (docs)

However, we still have a lot of ground to cover. This is an umbrella issue covering the next phase of development.

Priorities

The focus of milestone 2 is:

  1. Filling in the gaps in our API, to cover all of ESLint's API surface.
  2. Support JS plugins in language server (IDEs).
  3. Support framework plugins (React, Vue, Svelte etc).
  4. Fix bugs.

Overall aim is to make Oxlint able to run any (or almost any) ESLint plugin without modification.

We should prioritize APIs which have highest impact in terms of enabling more plugins to work "out of the box".

Performance

Performance is NOT a priority at this stage. If we can get a feature working quickly by pulling in a dependency (even one that's not well-optimized), we should do that. We can loop back and work on perf in Milestone 3.

However, any opportunity for future performance improvements should be documented - either by opening an issue, or by adding a comment to the code e.g.:

// TODO: Currently we do X for ease of implementation,
// but we should reimplement as Y later for better performance

Stubs and types

First step is to stub out the whole API:

Missing APIs

First priority on APIs is to implement APIs which are used in "fix code"-type rules (not stylistic/formatting rules).

Token APIs

2nd priority is to add support for stylistic / formatting rules.

Code path analysis

Lowest priority, because probably rarely used APIs, and potentially difficult to implement.

Testing

TS types

Weirdly, types seem to work fine in our test fixtures, but then don't work when Oxlint is consumed externally. 🤷

  • Improve our TS type defs, so they work for plugins written in TS

Language server

  • Support JS plugins in language server

Framework plugins

At present we don't support linting sections of multi-part files. It's tricky because raw transfer expect the source text to start at very start of the buffer. Supporting BOM (#12526) and supporting multi-section files are connected in this respect.

There are likely other features we'll need to implement to support linting other sections of single-file components (e.g. custom "processors").

First step is to research and scope out what's required.

Bug fixes + refactor

Metadata

Metadata

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions