docs(react): update tutorial for ESLint flat config format (#31672)

Update React monorepo tutorial:
- Fix reference to .eslintrc.base.json (now eslint.config.mjs)

🤖 Generated with [Claude Code](https://claude.ai/code)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #30199

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jack Hsu 2025-06-20 16:21:35 -04:00 committed by GitHub
parent c452821bfa
commit 1f493bf251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -974,7 +974,7 @@ Next, let's come up with a set of rules based on these tags:
- `scope:orders` should be able to import from `scope:orders`, `scope:shared` and `scope:products`
- `scope:products` should be able to import from `scope:products` and `scope:shared`
To enforce the rules, Nx ships with a custom ESLint rule. Open the `.eslintrc.base.json` at the root of the workspace and add the following `depConstraints` in the `@nx/enforce-module-boundaries` rule configuration:
To enforce the rules, Nx ships with a custom ESLint rule. Open the `eslint.config.mjs` at the root of the workspace and add the following `depConstraints` in the `@nx/enforce-module-boundaries` rule configuration:
```js {% fileName="eslint.config.mjs" %}
import nx from '@nx/eslint-plugin';