Skip to content

fix: remove console methods from impurity detection, closes #1616#1676

Merged
Rel1cx merged 1 commit intomainfrom
refactor/remove-console-impurity-detection
Mar 31, 2026
Merged

fix: remove console methods from impurity detection, closes #1616#1676
Rel1cx merged 1 commit intomainfrom
refactor/remove-console-impurity-detection

Conversation

@Rel1cx
Copy link
Copy Markdown
Owner

@Rel1cx Rel1cx commented Mar 31, 2026

Remove console (log, warn, error, etc.) from IMPURE_FUNCS map in shared/constants.ts and drop related test cases from purity rule.

Console methods are now allowed in pure components/hooks without triggering the purity rule.

Update "[ ]" to "[x]" to check a box

What kind of change does this PR introduce?

Check at least one. If you are introducing a new binding, you must reference an issue where this binding has been proposed, discussed and approved by the maintainers.

  • Bugfix
  • Feature
  • Perf
  • Docs
  • Test
  • Chore
  • Enhancement
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

If yes, please describe the impact and migration path for existing applications in an attached issue.

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • I have added a convincing reason for adding this feature, if necessary

Other information

Remove console (log, warn, error, etc.) from IMPURE_FUNCS map in
shared/constants.ts and drop related test cases from purity rule.

Console methods are now allowed in pure components/hooks without
triggering the purity rule.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
eslint-react Ready Ready Preview, Comment Mar 31, 2026 7:23pm

Request Review

@Rel1cx Rel1cx changed the title refactor: remove console methods from impurity detection, closes #1616 fix: remove console methods from impurity detection, closes #1616 Mar 31, 2026
@Rel1cx Rel1cx marked this pull request as ready for review March 31, 2026 19:23
@Rel1cx Rel1cx merged commit 10fe2eb into main Mar 31, 2026
15 checks passed
@Rel1cx Rel1cx deleted the refactor/remove-console-impurity-detection branch March 31, 2026 19:25
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