Skip to content

doc: Add Rslint configuration documentation page#294

Merged
hardfist merged 6 commits intomainfrom
copilot/fix-293
Aug 21, 2025
Merged

doc: Add Rslint configuration documentation page#294
hardfist merged 6 commits intomainfrom
copilot/fix-293

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 21, 2025

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:

  • Configuration file formats: Support for rslint.json and rslint.jsonc with comments
  • Core configuration options: Detailed documentation for ignores, languageOptions, rules, and plugins
  • Rule configuration formats: String, array, and object formats with practical examples
  • Plugin system: Complete documentation for @typescript-eslint and eslint-plugin-import plugins
  • TypeScript integration: Parser options including project configuration

Comprehensive Examples

  • Complete project setup: Real-world configuration example for typical TypeScript projects

Navigation Integration

  • Added "Configuration" section to main navigation between "Guide" and "Rules"
  • Proper meta configuration for site generation
  • Table of contents with anchor links for easy navigation

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:

  • Actual Go configuration types in internal/config/config.go
  • Real rule implementations and their option structures
  • Test cases from rule test suites

The 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.

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 21, 2025

Deploy Preview for rslint ready!

Name Link
🔨 Latest commit f900cc1
🔍 Latest deploy log https://app.netlify.com/projects/rslint/deploys/68a6ebe7fff26f0008dca2e2
😎 Deploy Preview https://deploy-preview-294--rslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-authored-by: hardfist <8898718+hardfist@users.noreply.github.com>
Copilot AI changed the title [WIP] [Doc]: Rslint Conifguration Page Add comprehensive Rslint configuration documentation page Aug 21, 2025
Copilot AI requested a review from hardfist August 21, 2025 06:01
@hardfist
Copy link
Copy Markdown
Contributor

@copilot remove Common Rule Configurations section

Co-authored-by: hardfist <8898718+hardfist@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 21, 2025

@copilot remove Common Rule Configurations section

Removed the Common Rule Configurations section as requested in commit 1730d26.

@hardfist
Copy link
Copy Markdown
Contributor

@copilot remove performance tip section

Co-authored-by: hardfist <8898718+hardfist@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 21, 2025

@copilot remove performance tip section

Removed the performance tip section as requested in commit e838f37.


This is especially useful for monorepos where you have multiple TypeScript projects.

##### languageOptions.parserOptions.projectService
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove languageOptions.parserOptions.projectService this section

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copilot AI changed the title Add comprehensive Rslint configuration documentation page Add Rslint configuration documentation page Aug 21, 2025
@hardfist hardfist marked this pull request as ready for review August 21, 2025 14:01
Copilot AI review requested due to automatic review settings August 21, 2025 14:01
@hardfist hardfist changed the title Add Rslint configuration documentation page doc: Add Rslint configuration documentation page Aug 21, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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"],
},
]

Copilot uses AI. Check for mistakes.
@hardfist hardfist merged commit b22bf35 into main Aug 21, 2025
11 of 12 checks passed
@hardfist hardfist deleted the copilot/fix-293 branch August 21, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc]: Rslint Conifguration Page

4 participants