Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Aug 20, 2025

What kind of change does this PR introduce?

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

Does this PR introduce a breaking change?

  • 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

@vercel
Copy link

vercel bot commented Aug 20, 2025

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

Project Deployment Preview Comments Updated (UTC)
eslint-react Building Building Preview Comment Aug 20, 2025 3:56am

@Rel1cx Rel1cx marked this pull request as ready for review August 20, 2025 03:57
@Rel1cx Rel1cx requested a review from Copilot August 20, 2025 03:57
Copy link
Contributor

Copilot AI left a 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 refactors context detection utilities by moving them from individual packages to a centralized ContextDetection namespace within the kit package. The refactor consolidates environment detection and testing context utilities to improve code organization and reusability.

Key changes:

  • Moved isProcessEnvNodeEnv and isProcessEnvNodeEnvCompare functions to ContextDetection module
  • Added new isViMockCallback function for detecting Vitest mock callbacks
  • Updated import statements across affected rules to use the new centralized utilities

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/utilities/kit/src/index.ts Exports new ContextDetection namespace
packages/utilities/kit/src/ContextDetection.ts Contains consolidated context detection utilities
packages/utilities/kit/package.json Adds dependency on @eslint-react/ast package
packages/utilities/kit/docs/ Documentation for new ContextDetection namespace
packages/utilities/ast/src/index.ts Removes exported ast-process-env module
packages/plugins/eslint-plugin-react-x/src/rules/ Updates imports to use new ContextDetection utilities
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Rel1cx Rel1cx merged commit 4cff122 into 2.0.0-beta Aug 20, 2025
8 of 10 checks passed
@Rel1cx Rel1cx deleted the context-detection branch August 20, 2025 07:46
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.

2 participants