Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented May 4, 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 May 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eslint-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 4, 2025 6:18pm

@Rel1cx Rel1cx requested a review from Copilot May 4, 2025 18:09
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 introduces a new ESLint rule "jsx-key-before-spread" that enforces the order of JSX attributes so that the key attribute appears before any spread attributes.

  • Added a new rule implementation in packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.ts.
  • Updated various configuration files and plugin registration to include the new rule.
  • Provided tests and documentation for the rule.

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/plugins/eslint-plugin/src/configs/x.ts Added rule mapping for "@eslint-react/jsx-key-before-spread".
packages/plugins/eslint-plugin/src/configs/all.ts Added rule mapping for "@eslint-react/jsx-key-before-spread".
packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.ts Implemented the new rule to enforce key order relative to spread attributes.
packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.spec.ts Added tests validating the new rule's behavior.
packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.md Created documentation for the new rule.
packages/plugins/eslint-plugin-react-x/src/plugin.ts Registered the new rule with the plugin.
packages/plugins/eslint-plugin-react-x/src/configs/recommended.ts Updated recommended config to include the new rule.
Files not reviewed (2)
  • apps/website/content/docs/rules/meta.json: Language not supported
  • apps/website/content/docs/rules/overview.mdx: Language not supported

@Rel1cx Rel1cx force-pushed the jsx-key-before-spread branch from 30d6406 to cb2f1d0 Compare May 4, 2025 18:15
@Rel1cx Rel1cx requested a review from Copilot May 4, 2025 18:15
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 introduces the new ESLint rule "jsx-key-before-spread" to enforce that the key attribute appears before any spread attributes in JSX elements. Key changes include updates to configuration files, the implementation of the new rule along with its tests and documentation, and exporting the rule in the plugin module.

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/plugins/eslint-plugin/src/configs/x.ts Added a configuration entry for "@eslint-react/jsx-key-before-spread".
packages/plugins/eslint-plugin/src/configs/all.ts Added a configuration entry for "@eslint-react/jsx-key-before-spread".
packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.ts New rule implementation enforcing key before spread in JSX elements.
packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.spec.ts Added test cases for the new rule.
packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.md New documentation for the rule.
packages/plugins/eslint-plugin-react-x/src/plugin.ts Modified to export the new "jsx-key-before-spread" rule.
packages/plugins/eslint-plugin-react-x/src/configs/recommended.ts Updated the recommended config to include the new rule.
Files not reviewed (2)
  • apps/website/content/docs/rules/meta.json: Language not supported
  • apps/website/content/docs/rules/overview.mdx: Language not supported

@Rel1cx Rel1cx merged commit 5894c57 into main May 4, 2025
8 of 9 checks passed
@Rel1cx Rel1cx deleted the jsx-key-before-spread branch May 4, 2025 18:22
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