feat(eslint-plugin): wire base-hook-signature and base-hook-no-forbidden-runtime#36254
Draft
Hotell wants to merge 1 commit into
Draft
feat(eslint-plugin): wire base-hook-signature and base-hook-no-forbidden-runtime#36254Hotell wants to merge 1 commit into
Hotell wants to merge 1 commit into
Conversation
…den-runtime Enables @nx/workspace-base-hook-signature and @nx/workspace-base-hook-no-forbidden-runtime in the internal @fluentui/eslint-plugin config. Depends on:- PR adding the base-hook-signature rule- PR adding the base-hook-no-forbidden-runtime ruleMust merge AFTER both rule-introducing PRs land on master. Lint gate also requires the separate useTagGroup.ts suppression PR.
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
| @@ -35,6 +35,8 @@ const __internal = { | |||
| /** @type {import('eslint').Linter.RulesRecord} */ | |||
There was a problem hiding this comment.
🕵🏾♀️ visual changes to review in the Visual Change Report
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 - RTL.submenus open.chromium.png | 404 | Changed |
vr-tests-react-components/Positioning 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 725 | Changed |
| vr-tests-react-components/Positioning.Positioning end.chromium.png | 512 | 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 | 59 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png | 148 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png | 115 | Changed |
vr-tests-react-components/TagPicker 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png | 1319 | Changed |
| vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png | 635 | Changed |
vr-tests-web-components/MenuList 4 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/MenuList. - RTL.2nd selected.chromium.png | 17 | Changed |
| vr-tests-web-components/MenuList. - RTL.1st selected.chromium_2.png | 39384 | Changed |
| vr-tests-web-components/MenuList. - RTL.2nd selected.chromium_3.png | 38816 | Changed |
| vr-tests-web-components/MenuList. - RTL.normal.chromium_1.png | 39083 | Changed |
vr-tests-web-components/TextInput 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/TextInput. - Dark Mode.normal.chromium_1.png | 288 | 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-LineChart 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-LineChart.Events - Dark Mode.default.chromium.png | 16 | Changed |
| vr-tests/react-charting-LineChart.Events.default.chromium.png | 17 | Changed |
vr-tests/react-charting-MultiStackBarChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-MultiStackBarChart.Basic_PartToWhole - Dark Mode.default.chromium.png | 363 | Changed |
vr-tests/react-charting-VerticalBarChart 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-VerticalBarChart.Basic - Secondary Y Axis.default.chromium.png | 3 | Changed |
| vr-tests/react-charting-VerticalBarChart.Grouped - Wrap Labels - Dark Mode.default.chromium.png | 2987 | Changed |
There were 2 duplicate changes discarded. Check the build logs for more information.
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
Wires the two new workspace rules into the internal
@fluentui/eslint-pluginconfig:'@nx/workspace-base-hook-signature': 'error''@nx/workspace-base-hook-no-forbidden-runtime': 'error'After this lands, every project that consumes
@fluentui/eslint-plugin's internal preset (i.e. allreact-componentspackages viaeslint.config.js→ rooteslint.config.js) enforces both rules onuseFooBasehook files.Plan reference
Part of the split of #36251 — see
prd/eslint-rules-base-hook-pr-split.spec.md(PR3).Merge order — IMPORTANT
This PR must merge last, after:
tools/ws-lint/rule-base-hook-signature(registersbase-hook-signature)tools/ws-lint/rule-base-hook-no-forbidden-runtime(registersbase-hook-no-forbidden-runtime)Without those,
nx run-many -t lintwill fail withCould not find "workspace-base-hook-*" in plugin "@nx".Additional gate
Lint cannot pass cleanly until the separate
useTagGroup.tssuppression PR lands — the newbase-hook-signaturerule already detected a real violation inpackages/react-components/react-tags/library/src/components/TagGroup/useTagGroup.ts(3 positional params instead of ≤ 2). That fix/suppression is being landed separately.Verification
After PR1 + PR2 are on master and this branch is rebased:
ESLint CLI perf (combined cost of both rules, TIMING=200)
react-buttonreact-comboboxreact-tagsNegligible — total lint runtime per package is dominated by
@typescript-eslint/no-deprecated(≈1000 ms) andreact-hooks/static-components(≈400 ms).Out of scope
useTagGroup.tsfix/suppression (separate PR).