Oxlint-tsgolint is a high-performance, type-aware TypeScript linter that serves as a backend for Oxlint. It leverages `typescript-go` (the Go port of TypeScript 7) to provide full compatibility with the TypeScript type system, enabling deep semantic analysis for TypeScript projects. Currently at version 0.21.1, the package maintains an active release cadence with frequent updates for bug fixes, performance improvements, and new features. Its key differentiators include performance often 20-40x faster than traditional ESLint with `typescript-eslint` on large codebases, multi-core rule execution, and broad coverage of 59 out of 61 targeted `typescript-eslint` type-aware rules. It focuses on catching production-grade bugs that syntax-only linters miss, such as unhandled promise rejections. Users integrate it by installing it alongside Oxlint and enabling type-aware checks via Oxlint's CLI and configuration files, making it a critical component for projects requiring advanced static analysis without sacrificing linting speed.
npm install oxlint-tsgolintVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install `oxlint-tsgolint` via `oxlint` and run a basic type-aware linting scan, including an example of `.oxlintrc.json` configuration for specific rules.
Ensure `oxlint` is installed and use `oxlint --type-aware` or configure `typeAware: true` in `.oxlintrc.json`. Do not attempt to import `oxlint-tsgolint` directly into your code.
Consult the `oxlint` documentation for the list of supported `typescript/*` rules. Adjust your configuration or expectations accordingly for any unsupported rules.
Update your TypeScript version to 7.0+ and migrate your codebase to remove deprecated syntax or `tsconfig.json` options. Refer to TypeScript migration guides for assistance.
Optimize your `tsconfig.json` for smaller project graphs, consider running type-aware linting only in CI, or selectively enable rules that provide the most value for your project.
Monitor memory usage and consider breaking down very large projects into smaller `tsconfig` contexts if issues arise. Report performance regressions to the `oxc-project/tsgolint` GitHub repository.
Install or update both packages: `pnpm add -D oxlint-tsgolint@latest oxlint@latest` (or `npm`/`yarn`). Ensure your `oxlint` version is recent enough to support type-aware features.
Ensure `typeAware: true` is set in your `.oxlintrc.json` options, and the rule is listed under `rules` with an appropriate severity. Alternatively, run `oxlint --type-aware --rules typescript/some-rule:error` for ad-hoc checks.
Create a `tsconfig.json` file in your project's root. If it's located elsewhere, specify its path in your `.oxlintrc.json` or via `oxlint` CLI options.