- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 54
 
chore: integrate Rslint for type-aware linting #1151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
          ✅ Deploy Preview for rslib ready!
 To edit notification comments on pull requests, go to your Netlify project configuration.  | 
    
There was a problem hiding this 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 Rslint (a TypeScript linter) to the project as a development tool and includes associated code changes to address various linting issues throughout the codebase.
- Adds Rslint configuration and integrates it into the linting workflow
 - Fixes multiple TypeScript and JavaScript code style issues identified by the linter
 - Updates function calls, boolean comparisons, and string template usage for better code quality
 
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description | 
|---|---|
| rslint.jsonc | Adds Rslint configuration with TypeScript rules (mostly disabled initially) | 
| package.json | Adds @rslint/core dependency and integrates lint:type script into main lint command | 
| packages/plugin-dts/src/utils.ts | Fixes function binding, template string usage, and async function declarations | 
| packages/plugin-dts/src/tsc.ts | Fixes function binding for TypeScript system methods | 
| packages/plugin-dts/src/index.ts | Fixes function binding for TypeScript file existence check | 
| packages/plugin-dts/src/dts.ts | Simplifies boolean comparisons and removes unnecessary non-null assertions | 
| packages/plugin-dts/src/apiExtractor.ts | Removes unnecessary non-null assertion and redundant string operations | 
| packages/core/src/utils/logger.ts | Removes unnecessary template string wrapping | 
| packages/core/src/utils/helper.ts | Updates array type syntax for consistency | 
| packages/core/src/css/libCssExtractLoader.ts | Fixes non-null assertions and string coercion | 
| packages/core/src/css/cssConfig.ts | Refactors return statements to use early returns consistently | 
| packages/core/src/config.ts | Improves boolean comparisons, early returns, and removes unnecessary type assertions | 
| packages/core/src/cli/prepare.ts | Removes unnecessary template string wrapping | 
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
 
Comments suppressed due to low confidence (1)
package.json:46
- The package @rslint/core version ^0.1.5 may not exist. Based on the PR description mentioning Rslint from web-infra-dev/rslint, verify this is the correct package name and version.
 
    "@rslint/core": "^0.1.5",
Summary
Rslint yes.
Related Links
Checklist