# tsgolint: An Experimental Go-Powered Linter for TypeScript/JavaScript

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/typescript-eslint-tsgolint
Generated for open source discovery and AI-assisted research.

tsgolint is an experimental proof-of-concept linter for JavaScript and TypeScript, leveraging typescript-go and written in Go. It aims to explore significant performance improvements, demonstrating a 20-40x speedup over ESLint + typescript-eslint by using native parsing, direct TS AST usage, and parallel processing. While a prototype not under active development, it showcases the potential for faster typed linting.

GitHub: https://github.com/typescript-eslint/tsgolint
OSRepos URL: https://osrepos.com/repo/typescript-eslint-tsgolint

## Summary

tsgolint is an experimental proof-of-concept linter for JavaScript and TypeScript, leveraging typescript-go and written in Go. It aims to explore significant performance improvements, demonstrating a 20-40x speedup over ESLint + typescript-eslint by using native parsing, direct TS AST usage, and parallel processing. While a prototype not under active development, it showcases the potential for faster typed linting.

## Topics

- Go
- TypeScript
- JavaScript
- Linting
- Developer Tools
- Performance
- Static Analysis
- Experimental

## Repository Information

Last analyzed by OSRepos: Tue Apr 14 2026 12:17:23 GMT+0100 (Western European Summer Time)
Detail views: 7
GitHub clicks: 19

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

**tsgolint** is an experimental proof-of-concept linter for JavaScript and TypeScript, developed by the `typescript-eslint` team. Written in Go and powered by the [typescript-go](https://github.com/microsoft/typescript-go){:target="_blank"} project, its primary goal is to investigate new architectures and performance characteristics for linting. It serves as a prototype to explore how much faster linting could be by moving the linter to Go alongside `typescript-go`.

It's important to note that `tsgolint` is in its early stages of development, is not actively being worked on, and is not expected to be production-ready. However, it successfully prototypes a primitive linter engine, a rules tester, a source code fixer, and implements 40 type-aware `typescript-eslint` rules.

## Installation

To build `tsgolint` from source, follow these steps:

bash
git submodule update --init                       # init typescript-go submodule

cd typescript-go
git am --3way --no-gpg-sign ../patches/*.patch    # apply typescript-go patches
cd ..

go build -o tsgolint ./cmd/tsgolint


## Examples

`tsgolint` has successfully prototyped the implementation of 40 type-aware rules from `typescript-eslint`. These rules cover various aspects of code quality and potential issues in TypeScript and JavaScript projects. For a complete list of implemented rules, please refer to the project's [GitHub README](https://github.com/typescript-eslint/tsgolint){:target="_blank"}. While a basic CLI is available, `tsgolint` primarily focuses on demonstrating the underlying performance benefits rather than offering a rich set of command-line features or editor integrations at this experimental stage.

## Why Use tsgolint (as an experiment)

The most compelling aspect of `tsgolint` is its remarkable performance. Benchmarks indicate that `tsgolint` is **20-40 times faster** than ESLint combined with `typescript-eslint`. This significant speedup is attributed to several key factors:

*   **Native Speed Parsing and Type-Checking:** Leveraging [typescript-go](https://github.com/microsoft/typescript-go){:target="_blank"}, `tsgolint` benefits from native Go performance for parsing and type-checking JavaScript and TypeScript code.
*   **Direct TS AST Usage:** Unlike traditional setups that might involve conversions from TypeScript AST to ESTree AST, `tsgolint` directly uses the TypeScript AST in its rules, eliminating overhead.
*   **Parallel Processing:** `tsgolint` is designed to utilize all available CPU cores for parallel parsing, type-checking, and linting, further enhancing its speed.

It's crucial to remember that `tsgolint` is an experiment to explore these performance boundaries. It is not intended to divert significant development resources from `typescript-eslint`, which remains the primary focus for typed linting with ESLint. This project serves as a valuable research tool to understand the potential of Go-based linting solutions.

## Links

*   **GitHub Repository:** [https://github.com/typescript-eslint/tsgolint](https://github.com/typescript-eslint/tsgolint){:target="_blank"}
*   **typescript-go Project:** [https://github.com/microsoft/typescript-go](https://github.com/microsoft/typescript-go){:target="_blank"}
*   **typescript-eslint Blog on ASTs:** [https://typescript-eslint.io/blog/asts-and-typescript-eslint/#ast-formats](https://typescript-eslint.io/blog/asts-and-typescript-eslint/#ast-formats){:target="_blank"}
*   **typescript-eslint Issue for tsgo Integration:** [https://github.com/typescript-eslint/typescript-eslint/issues/10940](https://github.com/typescript-eslint/typescript-eslint/issues/10940){:target="_blank"}