Skip to content

chore: migrate React example to @eslint-react/eslint-plugin - #768

Open
lumirlumir wants to merge 1 commit into
mainfrom
chore/migrate-react-example-to-eslint-react-eslint-plugin
Open

lumirlumir wants to merge 1 commit into
mainfrom
chore/migrate-react-example-to-eslint-react-eslint-plugin

Conversation

@lumirlumir

@lumirlumir lumirlumir commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Prerequisites checklist

AI acknowledgment

Check all that apply.

  • I did not use AI to generate this PR.
  • I used AI to write or edit the description of this PR (including translation).
  • I used AI to understand the codebase.
  • I used AI to write or edit the files in this PR and I reviewed the files.

What is the purpose of this pull request?

Following the decision made in eslint/create-config#273.

This PR replaces eslint-plugin-react with @eslint-react/react-plugin in examples to unblock the upgrade to ESLint v10.

This was also discussed at the TSC meeting as a way to encourage users to adopt @eslint-react/react-plugin instead.

What changes did you make? (Give an overview)

This PR replaces eslint-plugin-react with @eslint-react/react-plugin to unblock the upgrade to ESLint v10.

Related Issues

eslint/create-config#273

Is there anything you'd like reviewers to focus on?

N/A

Summary by CodeRabbit

  • New Features
    • The React example now accepts multiple names and displays a greeting for each.
  • Documentation
    • Updated the example’s documented ESLint output to reflect the list-key warning.
  • Chores
    • Updated linting configuration across the examples and project.

@eslintbot eslintbot added this to Triage Nov 25, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Nov 25, 2026
@lumirlumir
lumirlumir marked this pull request as ready for review November 25, 2026 03:35
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The React example now renders a greeting for each name and uses @eslint-react/eslint-plugin. Its documented lint output reports a missing list key. ESLint dependency ranges are updated in the React example, TypeScript example, and root package.

Changes: React example lint update

Layer / File(s) Summary
Update the React example and ESLint dependencies
examples/react/package.json, examples/typescript/package.json, package.json, examples/react/eslint.config.mjs, examples/react/README.md
The React example uses @eslint-react/eslint-plugin and maps names to greeting paragraphs. Its documented lint output reports a missing list key. ESLint dependency ranges are updated across the listed packages.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: nzakas, mdjermanovic

Merge Risk: Minimal · up to 06701

This change swaps the React example's lint plugin and updates ESLint dependency ranges. It does not touch runtime package behavior, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the React example moves from eslint-plugin-react to the @eslint-react plugin. The raw summary confirms the eslint config, package.json, and README changes match this. …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the React example moves from eslint-plugin-react to the @eslint-react plugin. The raw summary confirms the eslint config, package.json, and README changes match this. The PR objectives name the package as @eslint-react/react-plugin in the description, while the title and commit use @eslint-react/eslint-plugin. The summary's package.json entry uses @eslint-react/eslint-plugin, so the title matches the code change. The title is a conventional-commit style sentence with a clear scope.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b9f2f6bf-6140-44d5-b0f6-4c279a2feffc
Commits

Reviewing files that changed from the base of the PR and between e3ce918 and 0670182.

Files selected for processing: 5

  • examples/react/README.md
  • examples/react/eslint.config.mjs
  • examples/react/package.json
  • examples/typescript/package.json
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

jsx: true,
},
},
ecmaVersion: 2015,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think setting ecmaVersion to 2015 here is also a relict, as before flat config it defaulted to "5".
In other words I think we should just remove the property, so it defaults to "latest".

@DMartens DMartens moved this from Needs Triage to Implementing in Triage Nov 25, 2026
files: ["**/*.md/*.jsx"],
languageOptions: {
globals: {
React: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since @eslint-react has no equivalent of react/react-in-jsx-scope, I think the React global isn't needed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Implementing

Development

Successfully merging this pull request may close these issues.

3 participants