Type aware linting for oxlint
See the codeHigh-performance type-aware linting for Oxlint.
tsgolint executes lint rules that require TypeScript semantic analysis, using typescript-go for full compatibility with the TypeScript type system, and targets TypeScript 7 (codenamed Project Corsa).
It is designed to integrate seamlessly with Oxlint's fast syntax linting, enabling projects to run deeper semantic checks without sacrificing performance.
Key highlights:
typescript-eslint type-aware rules implementedno-floating-promises)This project originated in typescript-eslint/tsgolint, with fork permission granted by @auvred.
Running oxlint --type-aware in CI catches bugs that require type information to detect.
For example, typescript/no-floating-promises catches silently dropped async failures:
async function saveUser(user) {
const res = await fetch('/api/users', {
method: 'POST',
body: JSON.stringify(user),
});
if (!res.ok) throw new Error('save failed');
}
function onSubmit(user) {
saveUser(user); // no-floating-promises: Promise is created but never handled
showToast('Saved!'); // UI claims success even if the request rejects
}
Without this rule, rejected promises can be missed and reach production as flaky, hard-to-debug failures.
tsgolint is integrated into Oxlint as the type-aware backend. Install and use via Oxlint:
# Install oxlint with type-aware support
pnpm add -D oxlint-tsgolint@latest
# Quick start
pnpm dlx oxlint --type-aware
# Or run on your project
oxlint --type-aware
# Optionally also run typechecking at the same time
oxlint --type-aware --type-check
--type-aware: enables typescript/* rules that require TypeScript semantic analysis via tsgolint--type-check: includes type diagnostics from typescript-go in type-aware runsConfigure type-aware rules in .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
// alternatively, configure via options field
"options": {
"typeAware": true,
"typeCheck": true,
},
"rules": {
"typescript/no-floating-promises": "error",
"typescript/no-misused-promises": "error",
},
}
Over 50 TypeScript-specific type-aware rules are available. For detailed setup and configuration, see the Oxlint Type-Aware Linting guide.
[!NOTE] Non-type-aware TypeScript rules can be found in Oxlint's TypeScript rules under the TypeScript source.
Oxlint separates linting into two layers:
| Layer | Purpose | Speed |
|---|---|---|
| Oxlint | Syntax & structural analysis | Instant |
| tsgolint | Type-aware semantic rules | Requires type analysis |
This architecture keeps the common case extremely fast while enabling powerful type-aware checks when needed.
Oxlint handles file discovery, configuration, and output formatting, while tsgolint executes type-aware rules and emits semantic diagnostics.
Traditional type-aware linting in the JavaScript ecosystem typically works by embedding TypeScript's type-analysis engine inside a JavaScript linter.
This approach introduces several bottlenecks:
tsgolint takes a different approach: it runs directly on typescript-go, avoiding these bottlenecks and allowing semantic analysis to run efficiently alongside Oxlint.
Benchmarks on an Apple M4 Pro compare ESLint + typescript-eslint with tsgolint:
| Repository | ESLint + typescript-eslint | tsgolint | Speedup |
|---|---|---|---|
| microsoft/vscode | 83.2s | 6.96s | 12x |
| microsoft/typescript | 27.2s | 1.94s | 14x |
| typeorm/typeorm | 13.2s | 0.75s | 18x |
| vuejs/core | 12.3s | 0.95s | 13x |
See benchmarks for detailed performance comparisons.
tsgolint is stable and powers Oxlint's type-aware linting mode. See the Type-Aware Linting Stable announcement for details about the stable release.
tsgolint is built directly on TypeScript 7, so its versions track the TypeScript release they support. For example, in v7.0.2001:
7.0.2 is the TypeScript version001 is the tsgolint patch versionA fix released against the same TypeScript version increments the patch suffix, so the next release would be v7.0.2002. When the supported TypeScript version changes, the TypeScript portion changes and the patch suffix resets.
Current development focuses on expanding rule coverage and ecosystem integration:
typescript-eslint rule support[!NOTE] We are not currently accepting PRs for new rules beyond what
typescript-eslintsupports, so that we can focus our limited engineering capacity on the items listed above.
For detailed technical documentation, see ARCHITECTURE.md.
We welcome contributions! See CONTRIBUTING.md for:
60 of the 62 targeted rules are implemented.
(top 24 of 104)
3,108 followers · starred Jul 2025
768 followers · starred Jul 2025
111,745 followers · starred Jul 2025
1,524 followers · starred Aug 2025
Type aware linting for oxlint
See the codeHigh-performance type-aware linting for Oxlint.
tsgolint executes lint rules that require TypeScript semantic analysis, using typescript-go for full compatibility with the TypeScript type system, and targets TypeScript 7 (codenamed Project Corsa).
It is designed to integrate seamlessly with Oxlint's fast syntax linting, enabling projects to run deeper semantic checks without sacrificing performance.
Key highlights:
typescript-eslint type-aware rules implementedno-floating-promises)This project originated in typescript-eslint/tsgolint, with fork permission granted by @auvred.
Running oxlint --type-aware in CI catches bugs that require type information to detect.
For example, typescript/no-floating-promises catches silently dropped async failures:
async function saveUser(user) {
const res = await fetch('/api/users', {
method: 'POST',
body: JSON.stringify(user),
});
if (!res.ok) throw new Error('save failed');
}
function onSubmit(user) {
saveUser(user); // no-floating-promises: Promise is created but never handled
showToast('Saved!'); // UI claims success even if the request rejects
}
Without this rule, rejected promises can be missed and reach production as flaky, hard-to-debug failures.
tsgolint is integrated into Oxlint as the type-aware backend. Install and use via Oxlint:
# Install oxlint with type-aware support
pnpm add -D oxlint-tsgolint@latest
# Quick start
pnpm dlx oxlint --type-aware
# Or run on your project
oxlint --type-aware
# Optionally also run typechecking at the same time
oxlint --type-aware --type-check
--type-aware: enables typescript/* rules that require TypeScript semantic analysis via tsgolint--type-check: includes type diagnostics from typescript-go in type-aware runsConfigure type-aware rules in .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
// alternatively, configure via options field
"options": {
"typeAware": true,
"typeCheck": true,
},
"rules": {
"typescript/no-floating-promises": "error",
"typescript/no-misused-promises": "error",
},
}
Over 50 TypeScript-specific type-aware rules are available. For detailed setup and configuration, see the Oxlint Type-Aware Linting guide.
[!NOTE] Non-type-aware TypeScript rules can be found in Oxlint's TypeScript rules under the TypeScript source.
Oxlint separates linting into two layers:
| Layer | Purpose | Speed |
|---|---|---|
| Oxlint | Syntax & structural analysis | Instant |
| tsgolint | Type-aware semantic rules | Requires type analysis |
This architecture keeps the common case extremely fast while enabling powerful type-aware checks when needed.
Oxlint handles file discovery, configuration, and output formatting, while tsgolint executes type-aware rules and emits semantic diagnostics.
Traditional type-aware linting in the JavaScript ecosystem typically works by embedding TypeScript's type-analysis engine inside a JavaScript linter.
This approach introduces several bottlenecks:
tsgolint takes a different approach: it runs directly on typescript-go, avoiding these bottlenecks and allowing semantic analysis to run efficiently alongside Oxlint.
Benchmarks on an Apple M4 Pro compare ESLint + typescript-eslint with tsgolint:
| Repository | ESLint + typescript-eslint | tsgolint | Speedup |
|---|---|---|---|
| microsoft/vscode | 83.2s | 6.96s | 12x |
| microsoft/typescript | 27.2s | 1.94s | 14x |
| typeorm/typeorm | 13.2s | 0.75s | 18x |
| vuejs/core | 12.3s | 0.95s | 13x |
See benchmarks for detailed performance comparisons.
tsgolint is stable and powers Oxlint's type-aware linting mode. See the Type-Aware Linting Stable announcement for details about the stable release.
tsgolint is built directly on TypeScript 7, so its versions track the TypeScript release they support. For example, in v7.0.2001:
7.0.2 is the TypeScript version001 is the tsgolint patch versionA fix released against the same TypeScript version increments the patch suffix, so the next release would be v7.0.2002. When the supported TypeScript version changes, the TypeScript portion changes and the patch suffix resets.
Current development focuses on expanding rule coverage and ecosystem integration:
typescript-eslint rule support[!NOTE] We are not currently accepting PRs for new rules beyond what
typescript-eslintsupports, so that we can focus our limited engineering capacity on the items listed above.
For detailed technical documentation, see ARCHITECTURE.md.
We welcome contributions! See CONTRIBUTING.md for:
60 of the 62 targeted rules are implemented.
(top 24 of 104)
3,108 followers · starred Jul 2025
768 followers · starred Jul 2025
111,745 followers · starred Jul 2025
1,524 followers · starred Aug 2025