chore(eslint): enforce consistent-type-imports across react packages#35966
Open
chore(eslint): enforce consistent-type-imports across react packages#35966
Conversation
…-fix all vNext packages Agent-Logs-Url: https://github.com/microsoft/fluentui/sessions/cf4ff664-ec9d-43b5-8d2f-7862d1857a8e Co-authored-by: dmytrokirpa <1492102+dmytrokirpa@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
dmytrokirpa
April 9, 2026 07:59
View session
Contributor
|
…ent-type-imports Agent-Logs-Url: https://github.com/microsoft/fluentui/sessions/082bb11f-e273-437a-9eba-180cf522657d Co-authored-by: dmytrokirpa <1492102+dmytrokirpa@users.noreply.github.com>
Contributor
Author
Done in
One note: during the lint fix run, the |
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
| @@ -0,0 +1,7 @@ | |||
| { | |||
There was a problem hiding this comment.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/Avatar Converged 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Avatar Converged.badgeMask.normal.chromium.png | 3 | Changed |
vr-tests-react-components/Charts-DonutChart 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png | 5570 | Changed |
| vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png | 7530 | Changed |
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png | 413 | Changed |
vr-tests-react-components/Positioning 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Positioning.Positioning end.chromium.png | 724 | Changed |
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 609 | Changed |
vr-tests-react-components/ProgressBar converged 3 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png | 25 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png | 143 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png | 134 | Changed |
vr-tests-react-components/Skeleton converged 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Skeleton converged.Opaque Skeleton with square - Dark Mode.default.chromium.png | 2 | Changed |
vr-tests-react-components/TagPicker 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/TagPicker.disabled - High Contrast.chromium.png | 1319 | Changed |
vr-tests-web-components/Avatar 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/Avatar. - Dark Mode.normal.chromium.png | 10380 | Changed |
vr-tests-web-components/MenuList 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/MenuList. - RTL.normal.chromium_1.png | 39083 | Changed |
vr-tests-web-components/RadioGroup 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/RadioGroup. - Dark Mode.2nd selected.chromium_3.png | 119 | Changed |
vr-tests/Callout 6 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Callout.Left bottom edge.default.chromium.png | 3182 | Changed |
| vr-tests/Callout.Rendering callout attached to a rectangle.default.chromium.png | 1835 | Changed |
| vr-tests/Callout.Bottom center.default.chromium.png | 2128 | Changed |
| vr-tests/Callout.Top right edge.default.chromium.png | 1146 | Changed |
| vr-tests/Callout.No callout width specified.default.chromium.png | 2143 | Changed |
| vr-tests/Callout.Root.default.chromium.png | 2195 | Changed |
vr-tests/Coachmark 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Coachmark.Collapsed.default.chromium.png | 159 | Changed |
vr-tests/react-charting-AreaChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-AreaChart.Custom Accessibility.default.chromium.png | 11 | Changed |
vr-tests/react-charting-LineChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-LineChart.Events.default.chromium.png | 1 | Changed |
vr-tests/react-charting-MultiStackBarChart 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-MultiStackBarChart.Basic_Absolute - RTL.default.chromium.png | 343 | Changed |
| vr-tests/react-charting-MultiStackBarChart.Basic_PartToWhole.default.chromium.png | 359 | Changed |
vr-tests/react-charting-VerticalBarChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-VerticalBarChart.Basic - Secondary Y Axis.default.chromium.png | 3 | Changed |
There were 2 duplicate changes discarded. Check the build logs for more information.
dmytrokirpa
approved these changes
Apr 10, 2026
dmytrokirpa
reviewed
Apr 10, 2026
| afterEach(sharedAfterEach); | ||
| it('renders Areachart correctly', async () => { | ||
| let wrapper = render(<AreaChart data={chartData} />); | ||
| const wrapper = render(<AreaChart data={chartData} />); |
Contributor
There was a problem hiding this comment.
didn't change it manually, it was changed by eslint --fix
layershifter
approved these changes
Apr 10, 2026
Hotell
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Enforces the
@typescript-eslint/consistent-type-importsESLint rule across allvNext(react-components) packages, requiringimport typefor type-only imports.Why: Using
import typemakes it explicit that an import is erased at compile time. This improves compatibility with tools that perform single-file transpilation (e.g. Babel, esbuild, SWC), reduces the risk of accidental runtime imports of type-only symbols, and keeps bundle size tight.Changes
@typescript-eslint/consistent-type-importsrule topackages/eslint-plugin/src/configs/react/index.jsyarn nx run-many --target=lint --fix --projects="tag:vNext" --parallel=8to convert all existing imports toimport typewhere applicable (~75 packages)export *expansions inpackages/charts/react-chartsthat were incorrectly expanded by theno-export-allrule interaction; manually resolved residual linter issuesetc/api.mdfiles (reflectingimport typechanges in public API surface)minorbump for@fluentui/eslint-plugin,patchbump for all dependent packages