oxlint-tsgolint 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +184 -0
  2. package/package.json +7 -7
package/README.md ADDED
@@ -0,0 +1,184 @@
1
+ <div align="center">
2
+ <h1>✨ tsgolint ✨</h1>
3
+ </div>
4
+
5
+ <div align="center">
6
+
7
+ [![MIT licensed][license-badge]][license-url]
8
+ [![Build Status][ci-badge]][ci-url]
9
+ [![Discord chat][discord-badge]][discord-url]
10
+
11
+ </div>
12
+
13
+ **tsgolint** is a high-performance TypeScript linter containing only type-aware rules, powered by [typescript-go](https://github.com/microsoft/typescript-go) and designed for integration with [Oxlint](https://oxc.rs/docs/guide/usage/linter.html).
14
+
15
+ Key highlights:
16
+
17
+ - **Performance**: 20-40x faster than ESLint + typescript-eslint
18
+ - **Type-aware**: Comprehensive TypeScript type checking integration
19
+ - **Parallel**: Utilizes all available CPU cores
20
+ - **Compatible**: Implements typescript-eslint rules with consistent behavior
21
+
22
+ This project originated in [typescript-eslint/tsgolint](https://github.com/typescript-eslint/tsgolint). Fork permission is granted by @auvred.
23
+
24
+ > [!IMPORTANT]
25
+ > **tsgolint** is a prototype in the early stages of development.
26
+ > This is a community effort. Feel free to ask to be assigned to any of the [good first issues](https://github.com/oxc-project/tsgolint/contribute).
27
+
28
+ ## Installation & Usage
29
+
30
+ **tsgolint** is integrated into Oxlint as the type-aware backend. Install and use via Oxlint:
31
+
32
+ ```shell
33
+ # Install oxlint with type-aware support
34
+ pnpm add -D oxlint-tsgolint@latest
35
+
36
+ # Quick start
37
+ pnpm dlx oxlint --type-aware
38
+
39
+ # Or run on your project
40
+ oxlint --type-aware
41
+ ```
42
+
43
+ ### Configuration
44
+
45
+ Configure type-aware rules in `.oxlintrc.json`:
46
+
47
+ ```json
48
+ {
49
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
50
+ "rules": {
51
+ "typescript/no-floating-promises": "error",
52
+ "typescript/no-misused-promises": "error"
53
+ }
54
+ }
55
+ ```
56
+
57
+ Over 30 TypeScript-specific type-aware rules are available. For detailed setup and configuration, see the [Oxlint Type-Aware Linting guide](https://oxc.rs/blog/2025-08-17-oxlint-type-aware.html).
58
+
59
+ ## Performance
60
+
61
+ **tsgolint** is **20-40 times faster** than ESLint + typescript-eslint.
62
+
63
+ ### Real-World Performance Examples
64
+
65
+ - **napi-rs** (144 files): 1.0s
66
+ - **preact** (245 files): 2.7s
67
+ - **rolldown** (314 files): 1.5s
68
+ - **bluesky** (1152 files): 7.0s
69
+
70
+ ### Speed Sources
71
+
72
+ - **Native Speed**: Go implementation with direct TypeScript compiler integration
73
+ - **Zero Conversion**: Direct TypeScript AST usage without ESTree conversion overhead
74
+ - **Parallel Processing**: Multi-core execution utilizing all available CPU cores
75
+ - **Efficient Memory**: Streaming diagnostics and optimized resource usage
76
+
77
+ See [benchmarks](./benchmarks/README.md) for detailed performance comparisons.
78
+
79
+ ## Current Status
80
+
81
+ ### In Development 🚧
82
+
83
+ - Additional typescript-eslint rules
84
+ - Disable Comments
85
+ - Rule Configuration
86
+ - IDE usage
87
+
88
+ ## Architecture
89
+
90
+ **tsgolint** follows a clean separation between frontend and backend:
91
+
92
+ - **Oxlint CLI** handles file discovery, configuration, and output formatting
93
+ - **tsgolint backend** provides type-aware rule execution and diagnostics
94
+ - **TypeScript integration** via typescript-go for native performance
95
+
96
+ For detailed technical documentation, see [ARCHITECTURE.md](./ARCHITECTURE.md).
97
+
98
+ ## Contributing
99
+
100
+ We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for:
101
+
102
+ - Development setup and building instructions
103
+ - Testing procedures and guidelines
104
+ - How to implement new rules
105
+ - Code style and contribution workflow
106
+
107
+ ## Implemented Rules (40/59)
108
+
109
+ - [ ] [consistent-return](https://typescript-eslint.io/rules/consistent-return)
110
+ - [ ] [consistent-type-exports](https://typescript-eslint.io/rules/consistent-type-exports)
111
+ - [ ] [dot-notation](https://typescript-eslint.io/rules/dot-notation)
112
+ - [ ] [naming-convention](https://typescript-eslint.io/rules/naming-convention)
113
+ - [ ] [no-deprecated](https://typescript-eslint.io/rules/no-deprecated)
114
+ - [ ] [no-unnecessary-condition](https://typescript-eslint.io/rules/no-unnecessary-condition)
115
+ - [ ] [no-unnecessary-qualifier](https://typescript-eslint.io/rules/no-unnecessary-qualifier)
116
+ - [ ] [no-unnecessary-type-conversion](https://typescript-eslint.io/rules/no-unnecessary-type-conversion)
117
+ - [ ] [no-unnecessary-type-parameters](https://typescript-eslint.io/rules/no-unnecessary-type-parameters)
118
+ - [ ] [prefer-destructuring](https://typescript-eslint.io/rules/prefer-destructuring)
119
+ - [ ] [prefer-find](https://typescript-eslint.io/rules/prefer-find)
120
+ - [ ] [prefer-includes](https://typescript-eslint.io/rules/prefer-includes)
121
+ - [ ] [prefer-nullish-coalescing](https://typescript-eslint.io/rules/prefer-nullish-coalescing)
122
+ - [ ] [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
123
+ - [ ] [prefer-readonly](https://typescript-eslint.io/rules/prefer-readonly)
124
+ - [ ] [prefer-readonly-parameter-types](https://typescript-eslint.io/rules/prefer-readonly-parameter-types)
125
+ - [ ] [prefer-regexp-exec](https://typescript-eslint.io/rules/prefer-regexp-exec)
126
+ - [ ] [prefer-string-starts-ends-with](https://typescript-eslint.io/rules/prefer-string-starts-ends-with)
127
+ - [ ] [strict-boolean-expressions](https://typescript-eslint.io/rules/strict-boolean-expressions)
128
+ - [x] [await-thenable](https://typescript-eslint.io/rules/await-thenable)
129
+ - [x] [no-array-delete](https://typescript-eslint.io/rules/no-array-delete)
130
+ - [x] [no-base-to-string](https://typescript-eslint.io/rules/no-base-to-string)
131
+ - [x] [no-confusing-void-expression](https://typescript-eslint.io/rules/no-confusing-void-expression)
132
+ - [x] [no-duplicate-type-constituents](https://typescript-eslint.io/rules/no-duplicate-type-constituents)
133
+ - [x] [no-floating-promises](https://typescript-eslint.io/rules/no-floating-promises)
134
+ - [x] [no-for-in-array](https://typescript-eslint.io/rules/no-for-in-array)
135
+ - [x] [no-implied-eval](https://typescript-eslint.io/rules/no-implied-eval)
136
+ - [x] [no-meaningless-void-operator](https://typescript-eslint.io/rules/no-meaningless-void-operator)
137
+ - [x] [no-misused-promises](https://typescript-eslint.io/rules/no-misused-promises)
138
+ - [x] [no-misused-spread](https://typescript-eslint.io/rules/no-misused-spread)
139
+ - [x] [no-mixed-enums](https://typescript-eslint.io/rules/no-mixed-enums)
140
+ - [x] [no-redundant-type-constituents](https://typescript-eslint.io/rules/no-redundant-type-constituents)
141
+ - [x] [no-unnecessary-boolean-literal-compare](https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare)
142
+ - [x] [no-unnecessary-template-expression](https://typescript-eslint.io/rules/no-unnecessary-template-expression)
143
+ - [x] [no-unnecessary-type-arguments](https://typescript-eslint.io/rules/no-unnecessary-type-arguments)
144
+ - [x] [no-unnecessary-type-assertion](https://typescript-eslint.io/rules/no-unnecessary-type-assertion)
145
+ - [x] [no-unsafe-argument](https://typescript-eslint.io/rules/no-unsafe-argument)
146
+ - [x] [no-unsafe-assignment](https://typescript-eslint.io/rules/no-unsafe-assignment)
147
+ - [x] [no-unsafe-call](https://typescript-eslint.io/rules/no-unsafe-call)
148
+ - [x] [no-unsafe-enum-comparison](https://typescript-eslint.io/rules/no-unsafe-enum-comparison)
149
+ - [x] [no-unsafe-member-access](https://typescript-eslint.io/rules/no-unsafe-member-access)
150
+ - [x] [no-unsafe-return](https://typescript-eslint.io/rules/no-unsafe-return)
151
+ - [x] [no-unsafe-type-assertion](https://typescript-eslint.io/rules/no-unsafe-type-assertion)
152
+ - [x] [no-unsafe-unary-minus](https://typescript-eslint.io/rules/no-unsafe-unary-minus)
153
+ - [x] [non-nullable-type-assertion-style](https://typescript-eslint.io/rules/non-nullable-type-assertion-style)
154
+ - [x] [only-throw-error](https://typescript-eslint.io/rules/only-throw-error)
155
+ - [x] [prefer-promise-reject-errors](https://typescript-eslint.io/rules/prefer-promise-reject-errors)
156
+ - [x] [prefer-reduce-type-parameter](https://typescript-eslint.io/rules/prefer-reduce-type-parameter)
157
+ - [x] [prefer-return-this-type](https://typescript-eslint.io/rules/prefer-return-this-type)
158
+ - [x] [promise-function-async](https://typescript-eslint.io/rules/promise-function-async)
159
+ - [x] [related-getter-setter-pairs](https://typescript-eslint.io/rules/related-getter-setter-pairs)
160
+ - [x] [require-array-sort-compare](https://typescript-eslint.io/rules/require-array-sort-compare)
161
+ - [x] [require-await](https://typescript-eslint.io/rules/require-await)
162
+ - [x] [restrict-plus-operands](https://typescript-eslint.io/rules/restrict-plus-operands)
163
+ - [x] [restrict-template-expressions](https://typescript-eslint.io/rules/restrict-template-expressions)
164
+ - [x] [return-await](https://typescript-eslint.io/rules/return-await)
165
+ - [x] [switch-exhaustiveness-check](https://typescript-eslint.io/rules/switch-exhaustiveness-check)
166
+ - [x] [unbound-method](https://typescript-eslint.io/rules/unbound-method)
167
+ - [x] [use-unknown-in-catch-callback-variable](https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable)
168
+
169
+ ## Links
170
+
171
+ - [ARCHITECTURE.md](./ARCHITECTURE.md) - Detailed technical documentation
172
+ - [CONTRIBUTING.md](./CONTRIBUTING.md) - Development and contribution guidelines
173
+ - [Benchmarks](./benchmarks/README.md) - Performance comparison data
174
+ - [TypeScript Go](https://github.com/microsoft/typescript-go) - Underlying TypeScript compiler
175
+ - [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) - Frontend linter integration
176
+
177
+ <!-- Badge definitions -->
178
+
179
+ [license-badge]: https://img.shields.io/badge/license-MIT-blue.svg
180
+ [license-url]: LICENSE
181
+ [ci-badge]: https://github.com/oxc-project/tsgolint/actions/workflows/ci.yml/badge.svg
182
+ [ci-url]: https://github.com/oxc-project/tsgolint/actions/workflows/ci.yml
183
+ [discord-badge]: https://img.shields.io/discord/1079625926024900739?logo=discord&label=Discord
184
+ [discord-url]: https://discord.gg/9uXCAwqQZW
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.0",
2
+ "version": "0.2.1",
3
3
  "license": "MIT",
4
4
  "author": "auvred <aauvred@gmail.com>",
5
5
  "repository": "github:oxc-project/tsgolint",
@@ -13,11 +13,11 @@
13
13
  "tsgolint": "./bin/tsgolint.js"
14
14
  },
15
15
  "optionalDependencies": {
16
- "@oxlint-tsgolint/win32-x64": "0.2.0",
17
- "@oxlint-tsgolint/win32-arm64": "0.2.0",
18
- "@oxlint-tsgolint/linux-x64": "0.2.0",
19
- "@oxlint-tsgolint/linux-arm64": "0.2.0",
20
- "@oxlint-tsgolint/darwin-x64": "0.2.0",
21
- "@oxlint-tsgolint/darwin-arm64": "0.2.0"
16
+ "@oxlint-tsgolint/win32-x64": "0.2.1",
17
+ "@oxlint-tsgolint/win32-arm64": "0.2.1",
18
+ "@oxlint-tsgolint/linux-x64": "0.2.1",
19
+ "@oxlint-tsgolint/linux-arm64": "0.2.1",
20
+ "@oxlint-tsgolint/darwin-x64": "0.2.1",
21
+ "@oxlint-tsgolint/darwin-arm64": "0.2.1"
22
22
  }
23
23
  }