Skip to content

feat: enable newly ported rules in typescript recommended config#599

Merged
chenjiahan merged 2 commits intomainfrom
feat/enable-ts-recommended-rules-20260407
Apr 7, 2026
Merged

feat: enable newly ported rules in typescript recommended config#599
chenjiahan merged 2 commits intomainfrom
feat/enable-ts-recommended-rules-20260407

Conversation

@fansenze
Copy link
Copy Markdown
Contributor

@fansenze fansenze commented Apr 7, 2026

Summary

Enable 16 rules in the TypeScript recommended config that were previously commented out as "not implemented" and have since been ported:

Rules turned off (handled by TypeScript, per official eslint-recommended override):

  • no-func-assign
  • no-import-assign
  • no-obj-calls
  • no-setter-return
  • no-this-before-super
  • no-undef
  • no-unsafe-negation

TS-beneficial rules enabled:

  • no-var
  • prefer-const
  • prefer-rest-params

Remaining eslint:recommended rules (not turned off by TS):

  • no-empty-character-class
  • no-ex-assign
  • no-global-assign
  • no-invalid-regexp
  • no-self-assign
  • use-isnan

All rule names and values are aligned with the official typescript-eslint v8.57.0 eslint-recommended override and @eslint/js v9.32.0 eslint:recommended.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the TypeScript configuration in packages/rslint/src/configs/typescript.ts by enabling several ESLint rules that were previously commented out as unimplemented. These include rules such as no-func-assign, no-var, prefer-const, and use-isnan, which are now active in the configuration. I have no feedback to provide.

Enable 16 rules that have been ported and were previously commented out:
- Turn off rules handled by TypeScript: no-func-assign, no-import-assign,
  no-obj-calls, no-setter-return, no-this-before-super, no-undef,
  no-unsafe-negation
- Enable TS-beneficial rules: no-var, prefer-const, prefer-rest-params
- Enable remaining eslint:recommended rules: no-empty-character-class,
  no-ex-assign, no-global-assign, no-invalid-regexp, no-self-assign,
  use-isnan
@fansenze fansenze force-pushed the feat/enable-ts-recommended-rules-20260407 branch from 93b0417 to 35caa5b Compare April 7, 2026 03:42
The newly enabled prefer-const rule catches 4 violations in the
rslint codebase. Override to warn severity in rslint.config.ts to
avoid blocking CI while the violations are addressed separately.
@chenjiahan chenjiahan merged commit 0207282 into main Apr 7, 2026
10 checks passed
@chenjiahan chenjiahan deleted the feat/enable-ts-recommended-rules-20260407 branch April 7, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants