oxlint-tsgolint 7 がリリースされ、Oxlint の型情報付き lint が Stable になった。TypeScript 7.0.2 に追随し、typescript-eslint の型依存ルール 61 件中 59 件を実装する。alpha 時点の 43 件から 16 件増えた。

導入は依存追加のあと --type-aware を付ける。--type-check を併用すると、同じ TypeScript program 上でコンパイラ診断もまとめて報告できる。

sh
pnpm add -D oxlint oxlint-tsgolint@7
pnpm oxlint --type-aware
pnpm oxlint --type-aware --type-check

ルート設定でも同じスイッチを書ける。CLI フラグが設定より優先され、両オプションはルート設定専用である。

ts
import { defineConfig } from "oxlint";

export default defineConfig({
  options: {
    typeAware: true,
    typeCheck: true,
  },
});

ルール単位の所要時間は oxlint --type-aware --debug timings で確認できる。Apple M4 Pro(12 コア)上のベンチでは、ESLint + typescript-eslint と比べ vscode / typescript / typeorm / vuejs/core で 12〜18 倍速い。Darwin ARM64 ではデバッグ情報を剥がし、インストール済みバイナリを 29.7 MB から 21.8 MB へ、圧縮 npm ダウンロードを 13.1 MB から 7.2 MB へ減らした。

#参考文献