doc: Add Rslint configuration documentation page#294
Conversation
✅ Deploy Preview for rslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
Co-authored-by: hardfist <8898718+hardfist@users.noreply.github.com>
|
@copilot remove Common Rule Configurations section |
Co-authored-by: hardfist <8898718+hardfist@users.noreply.github.com>
|
@copilot remove performance tip section |
Co-authored-by: hardfist <8898718+hardfist@users.noreply.github.com>
website/docs/en/config/index.md
Outdated
|
|
||
| This is especially useful for monorepos where you have multiple TypeScript projects. | ||
|
|
||
| ##### languageOptions.parserOptions.projectService |
There was a problem hiding this comment.
@copilot remove languageOptions.parserOptions.projectService this section
There was a problem hiding this comment.
Removed the languageOptions.parserOptions.projectService section and all related references as requested in commit fc392f6.
Co-authored-by: hardfist <8898718+hardfist@users.noreply.github.com>
…equested Co-authored-by: hardfist <8898718+hardfist@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive configuration documentation for Rslint, creating a detailed reference guide for all supported configuration options in a structure similar to rsbuild's documentation.
Key changes:
- Creates a new configuration documentation page with detailed explanations of all config options
- Adds navigation integration placing "Configuration" between "Guide" and "Rules" sections
- Provides comprehensive examples including TypeScript project setups and plugin configurations
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
website/docs/en/config/index.md |
New comprehensive configuration documentation covering file formats, core options, rule configurations, and plugin system |
website/docs/en/config/_meta.json |
Meta configuration file to include the new config documentation in site generation |
website/docs/en/_nav.json |
Updates main navigation to add "Configuration" section between "Guide" and "Rules" |
| ``` | ||
|
|
||
| This creates a `rslint.jsonc` file with sensible defaults. | ||
|
|
There was a problem hiding this comment.
The documentation states that rslint --init creates a configuration file, but this command may not be implemented yet based on the project's current state. Consider verifying this command exists or noting it as a planned feature.
| To create a default configuration file, create a new file named `rslint.jsonc` in your project root and copy the example configuration below into it. | |
| > **Note:** The `rslint --init` command to automatically generate a configuration file is a planned feature and may not be available yet. | |
| Example: | |
| ```jsonc | |
| [ | |
| { | |
| "ignores": ["./dist/**", "./node_modules/**"], | |
| "languageOptions": { | |
| "parserOptions": { | |
| "project": ["./tsconfig.json"], | |
| }, | |
| }, | |
| "rules": { | |
| "@typescript-eslint/no-unused-vars": "error", | |
| "@typescript-eslint/array-type": ["warn", { "default": "array-simple" }], | |
| }, | |
| "plugins": ["@typescript-eslint"], | |
| }, | |
| ] |
This PR adds a comprehensive configuration documentation page for Rslint, providing detailed documentation for all supported configuration options similar to rsbuild's config documentation structure.
What's Added
New Configuration Documentation (
/website/docs/en/config/index.md)The new documentation page covers all aspects of Rslint configuration:
rslint.jsonandrslint.jsoncwith commentsignores,languageOptions,rules, andplugins@typescript-eslintandeslint-plugin-importpluginsprojectconfigurationComprehensive Examples
Navigation Integration
Example Configuration Formats
The documentation shows all supported rule configuration formats:
{ "rules": { // String format "@typescript-eslint/no-unused-vars": "error", // Array format with options "@typescript-eslint/array-type": ["warn", { "default": "array-simple" }], // Object format "@typescript-eslint/prefer-const": { "level": "error", "options": { "destructuring": "any" } } } }Validation
All configuration examples and rule options have been validated against:
internal/config/config.goThe website builds successfully and the new page is fully functional with proper syntax highlighting, code copying, and responsive design.
Fixes #293.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.