Skip to content

Conversation

@mainframev
Copy link
Contributor

@mainframev mainframev commented Jan 5, 2026

Some partner codebases have a lot of @fluentui/react/lib/* imports. The current implementation of this rule only inspects @fluentui/react imports, so these usages are not detected and no errors / warnings are reported.

Previous Behavior

@fluentui/react/lib/* imports were ignored

 FAIL   eslint-plugin-react-components  src/rules/prefer-fluentui-v9.spec.ts
  prefer-fluentui-v9
    valid
      ✓ import type { IDropdownOption } from '@fluentui/react'; (23 ms)
      ✓ import type { ITheme } from '@fluentui/react'; (3 ms)
      ✓ import { ThemeProvider } from '@fluentui/react'; (1 ms)
      ✓ import { Button } from '@fluentui/react-components'; (1 ms)
    invalid
      ✓ import { Dropdown, Icon } from '@fluentui/react'; (4 ms)
      ✓ import { Stack } from '@fluentui/react'; (2 ms)
      ✓ import { DatePicker } from '@fluentui/react'; (1 ms)
      ✕ import { CompoundButton } from '@fluentui/react/lib/Button'; (3 ms)
      ✕ import { Stack } from '@fluentui/react/lib/Stack'; (3 ms)

  ● prefer-fluentui-v9 › invalid › import { CompoundButton } from '@fluentui/react/lib/Button';

    assert.strictEqual(received, expected)

    Expected value to strictly be equal to:
      1
    Received:
      0

    Message:
      Should have 1 error but had 0: []

    0 !== 1

New Behavior

 PASS   eslint-plugin-react-components  src/rules/prefer-fluentui-v9.spec.ts
  prefer-fluentui-v9
    valid
      ✓ import type { IDropdownOption } from '@fluentui/react'; (22 ms)
      ✓ import type { ITheme } from '@fluentui/react'; (2 ms)
      ✓ import { ThemeProvider } from '@fluentui/react'; (2 ms)
      ✓ import { Button } from '@fluentui/react-components'; (1 ms)
    invalid
      ✓ import { Dropdown, Icon } from '@fluentui/react'; (4 ms)
      ✓ import { Stack } from '@fluentui/react'; (1 ms)
      ✓ import { DatePicker } from '@fluentui/react'; (2 ms)
      ✓ import { CompoundButton } from '@fluentui/react/lib/Button'; (1 ms)
      ✓ import { Stack } from '@fluentui/react/lib/Stack'; (3 ms)

Test Suites: 1 passed, 1 total
Tests:       9 passed, 9 total
Snapshots:   0 total
Time:        0.504 s, estimated 1 s
Ran all test suites.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

📊 Bundle size report

✅ No changes found

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Pull request demo site: URL

@github-actions github-actions bot added the CI label Jan 5, 2026
@mainframev mainframev marked this pull request as ready for review January 5, 2026 19:36
@mainframev mainframev requested a review from Hotell January 6, 2026 09:36
@mainframev mainframev merged commit f2c5878 into microsoft:master Jan 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants