Skip to content

feat: add core no-redeclare rule#1241

Open
fansenze wants to merge 1 commit into
mainfrom
feat/port-rule-no_redeclare-20260709
Open

feat: add core no-redeclare rule#1241
fansenze wants to merge 1 commit into
mainfrom
feat/port-rule-no_redeclare-20260709

Conversation

@fansenze

@fansenze fansenze commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Port ESLint core no-redeclare into internal/rules/no_redeclare and register it as a core rule.
  • Reuse the core implementation from @typescript-eslint/no-redeclare, preserving the TS wrapper defaults.
  • Add shared helpers for ECMAScript globals and /*global(s)*/ directive comment parsing, and reuse them from related rules.
  • Add upstream coverage plus extra edge/real-project cases and JS RuleTester coverage.

Related Links

Checks run:

  • pnpm run check-spell
  • pnpm run format:check
  • pnpm exec golangci-lint run ./internal/plugins/typescript/rules/no_redeclare ./internal/rules ./internal/rules/no_shadow ./internal/rules/no_undef ./internal/rules/no_redeclare ./internal/utils
  • Focused rule verification and real-repo checks were run locally during development.

Checklist

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

@fansenze fansenze force-pushed the feat/port-rule-no_redeclare-20260709 branch 3 times, most recently from b7fc04e to 731abad Compare July 9, 2026 11:26
@fansenze fansenze force-pushed the feat/port-rule-no_redeclare-20260709 branch from 731abad to aaab422 Compare July 10, 2026 01:16
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.

1 participant