Skip to content

[CORRUPTED] Synthetic Benchmark PR #27530 - [bench] Updated the client release group to use eslint-config-fluid v13.0 - #8

Open
amirzaushnizer wants to merge 8 commits into
base_pr_27530_20260621_4800from
corrupted_pr_27530_20260621_4800
Open

[CORRUPTED] Synthetic Benchmark PR #27530 - [bench] Updated the client release group to use eslint-config-fluid v13.0#8
amirzaushnizer wants to merge 8 commits into
base_pr_27530_20260621_4800from
corrupted_pr_27530_20260621_4800

Conversation

@amirzaushnizer

Copy link
Copy Markdown
Collaborator

Benchmark PR microsoft#27530

Type: Corrupted (contains bugs)

Original PR Title: [bench] Updated the client release group to use eslint-config-fluid v13.0
Original PR Description: Reconstructed for skills benchmark from microsoft#27530
Original PR URL: microsoft#27530

- Removed the no-restricted-syntax block from tree (now in the base config).
- Added an ESLint suppression in one test.
v13.0.0 is now past the minimumReleaseAge window, so the temporary minimumReleaseAgeExclude entry is no longer needed. Regenerated the lockfile without the override.
Bumping the eslint-config-fluid catalog entry to v13 applied the new config to both the client and examples release groups (they share the pnpm catalog), surfacing new lint errors. This fixes them:

- no-only-tests: added targeted suppressions where .only is driven by test data/options (merge-tree, container-runtime, local-server-stress-tests, map).
- no-restricted-syntax: import the TypeBox Type namespace via 'import * as Type' instead of the named value export (tree-cli-app).
- @eslint-react/no-create-ref: use useRef(null) instead of createRef() in a function component (triangle-view). createRef allocated a new ref every render.
- @eslint-react/no-useless-fragment: return null instead of an empty fragment (data-object-grid).
- @eslint-react/dom/no-render: migrate ReactDOM.render to createRoot().render() (shared-tree-demo, app-insights-logger, view-framework-sampler, devtools-test-app).
- Repaired text-editor and inventory-app eslint configs that referenced the removed classic 'react' plugin, re-expressing the intended rules via @eslint-react / react-hooks.

Render-callback timing: ReactDOM.render's third callback argument does not exist on createRoot().render(). Where that callback mattered, the side effect was moved into a useLayoutEffect (runs after DOM commit, before paint) rather than firing it before the commit. flushSync is not an option (@eslint-react/dom/no-flush-sync is an error).

devtools-test-app StrictMode removal: this app initializes a singleton Devtools instance and disposes it in an effect cleanup. The original code wrapped the app in <StrictMode> while rendering via the legacy ReactDOM.render API. React 18's StrictMode setup->cleanup->setup effect double-invocation only runs under the new createRoot path; under legacy ReactDOM.render the tree stays in React-17 mode, so that check never fired and the wrapper was effectively inert for effects. Migrating to createRoot activated the double-invoke, which disposed the singleton on the simulated unmount and left later renders using a disposed instance ('The devtools instance has been disposed'). The app is not resilient to that remount cycle, so StrictMode was removed to preserve the app's actual prior behavior; making it StrictMode-safe would be a larger refactor out of scope for this change.
…ols-view

Address @eslint-react and unicorn rule violations surfaced by the v13 config:

- blobs, devtools-view: return idiomatic null for empty render output and
  disable unicorn/no-null at the package level (matching data-object-grid).
- example-utils, external-data: migrate deprecated ReactDOM.render to
  createRoot().render() and allow the react-dom/client subpath import.
- devtools-view: hoist nested Recharts tick components (CustomizedXAxisTick/
  CustomizedYAxisTick) to top level to satisfy
  @eslint-react/no-nested-component-definitions, and return ReactNode from
  TreeDataView so null is permitted without @rushstack/no-new-null.
- data-object-grid: minor comment wording tweak.
…act-dom/client overrides

- DynamicComposedChart: revert the unnecessary refactor from the prior commit (top-level tick components, extracted GraphColorPalette interface, createGraphColorPalette signature change). Keep the X/Y axis tick renderers as in-component closures with their original names and JSX usage; the only change vs main is typing them with a concrete AxisTickProps instead of any, with a scoped @eslint-react/no-nested-component-definitions disable.
- blobs, data-object-grid, devtools-view: add a TODO (AB#75619) above the unicorn/no-null override noting React code should be excluded from the rule in the base eslint config.
- example-utils, external-data: document why react-dom/client is allow-listed for import-x/no-internal-modules (subpath export treated as internal even though it is React's public React 18 entry point).
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