rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[PR welcome]: Fix Rslint lint issues in the Rspack codebase

Open chenjiahan opened this issue 3 months ago • 5 comments

Goal

We use Rslint to catch potential type-related issues in our code.

Currently, some rules in rslint.json are set to warn and have not been fully fixed yet.

Pick one lint rule, change it from warnerror in rslint.json, and fix the reported issues in the TypeScript source code.

🤝 If you’re interested in participating in the Rspack project, this is a great starting point.

How to work on this

  1. Open rslint.json and choose one rule that is currently set to "warn".

  2. Change its level from "warn" to "error".

  3. Run:

    pnpm lint:type --quiet
    

    This will show the type-lint errors for that rule.

  4. Fix the reported issues in the TypeScript files.

  5. Commit the changes and open a Pull Request.

💡 Important: Each PR should focus on only one rule to keep reviews small and clear.

chenjiahan avatar Sep 25 '25 06:09 chenjiahan

can u assigne it to me please?

mt798jx avatar Sep 25 '25 09:09 mt798jx

Done 😄

chenjiahan avatar Sep 25 '25 10:09 chenjiahan

If possible, you could share which rules you’re currently working on. That way, other interested contributors can join in, since we have many rules that need to be fixed.

chenjiahan avatar Sep 25 '25 10:09 chenjiahan

I've fixed a rule @typescript-eslint/no-empty-interface, that's PR.

shuga2704 avatar Oct 19 '25 10:10 shuga2704

And another one @typescript-eslint/no-require-imports.

shuga2704 avatar Oct 19 '25 11:10 shuga2704