Skip to content

Commit 706565c

Browse files
hardfistCopilot
andauthored
chore: add basic guide (#175)
Co-authored-by: Copilot <[email protected]>
1 parent d1100cf commit 706565c

File tree

3 files changed

+71
-6
lines changed

3 files changed

+71
-6
lines changed

β€ŽGUIDE.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Rslint Guide
2+
3+
This guide provides basic documentation for using Rslint, a high-performance JavaScript and TypeScript linter written in Go.
4+
5+
## Installation
6+
7+
```bash
8+
# Install via npm
9+
npm install @rslint/core
10+
11+
# Install via pnpm
12+
pnpm add @rslint/core
13+
14+
# Install via yarn
15+
yarn add @rslint/core
16+
```
17+
18+
## Basic Usage
19+
20+
### Command Line Interface
21+
22+
```bash
23+
# use default rslint.json
24+
rslint
25+
# use custom configuration file
26+
rslint --config rslint.json
27+
28+
# Lint with auto-fix
29+
rslint --fix .
30+
31+
# Show help
32+
rslint --help
33+
```
34+
35+
### Configuration
36+
37+
**rslint.json**
38+
39+
```json
40+
[
41+
{
42+
// ignore files and folders for linting
43+
"ignores": ["./files-not-want-lint.ts", "./tests/**/fixtures/**.ts"],
44+
"languageOptions": {
45+
"parserOptions": {
46+
// Rslint will lint all files included in your typescript projects defined here
47+
// support lint multi packages in monorepo
48+
"project": ["./tsconfig.json", "packages/app1/tsconfig.json"]
49+
}
50+
},
51+
// same configuration as https://typescript-eslint.io/rules/
52+
"rules": {
53+
"@typescript-eslint/require-await": "off",
54+
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
55+
"@typescript-eslint/array-type": ["warn", { "default": "array-simple" }]
56+
},
57+
"plugins": [
58+
"@typescript-eslint" // will enable all implemented @typescript-eslint rules by default
59+
]
60+
}
61+
]
62+
```
63+
64+
## Editor Integration
65+
66+
### VS Code
67+
68+
Install the extension from the marketplace [rslint](https://marketplace.visualstudio.com/items?itemName=rstack.rslint)

β€ŽREADME.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ Rslint is a fork of [tsgolint](https://github.com/typescript-eslint/tsgolint), b
3232

3333
## πŸš€ Getting Started
3434

35-
> [!NOTE]
36-
> Documentation and installation guides are coming soon. Rslint is currently in active development.
37-
38-
Stay tuned for our first stable release with comprehensive documentation and migration guides.
35+
See [Guide](./GUIDE.md).
3936

4037
## πŸ¦€ Rstack
4138

β€Žpackages/rslint/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
## Features
66

7-
- ⚑ **Ultra-fast**: 10x faster than ESLint through Go-powered parallel processing
7+
- ⚑ **Ultra-fast**: 10x+ faster than ESLint through Go-powered parallel processing
88
- 🎯 **Typed linting first**: Enables typed linting by default for advanced semantic analysis
9-
- πŸ”§ **Easy migration**: Compatible with ESLint and TypeScript-ESLint configurations
9+
- πŸ”§ **Easy migration**: Compatible with ESLint and TypeScript-ESLint rule configurations
1010
- πŸ—οΈ **Project-level analysis**: Performs cross-module analysis for better linting results
1111
- πŸ“¦ **Monorepo support**: First-class support for large-scale TypeScript monorepos
1212
- πŸ”‹ **Batteries included**: Ships with all TypeScript-ESLint rules out of the box

0 commit comments

Comments
Β (0)