-
Notifications
You must be signed in to change notification settings - Fork 2.9k
disallow all globals in Fluent v9 #30967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
spmonahan
merged 25 commits into
microsoft:master
from
spmonahan:chore/disallow-globals
May 23, 2024
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
b42e18e
wip
spmonahan 3a97295
use 'window' from context
spmonahan e49b73c
fix: update global functions to use 'window' from Fluent context
spmonahan eb11579
change files
spmonahan c217c18
handle undefined window
spmonahan e68e733
fix ssr
spmonahan 0c52294
mock window
spmonahan e0ed00a
change restricted globals, disable lint rules, rollback previous changes
spmonahan 2b63a9e
change files
spmonahan c7cd9c1
correct change files
spmonahan c658164
fix rebase conflicts
spmonahan 345f5b2
use culled globals list
spmonahan 1d59831
fix lint in react-tabster
spmonahan 6127be5
change file
spmonahan e6795fd
fix: update `scrollIntoView` to accept option "window" argument
spmonahan d16b70a
change files
spmonahan 6a81041
fix useCallback deps
spmonahan 57dfce9
fix lint errors
spmonahan 6b1df12
fix ssr
spmonahan 43af8c3
use MutationObserver from global context
spmonahan 1cadc27
change file
spmonahan 5a8f837
pr feedback
spmonahan e8a591c
fix order on lint exception
spmonahan b64236c
fix useEffect deps
spmonahan 6253fe4
improve typing
spmonahan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-eslint-plugin-ea97d70f-085e-47bb-a6ac-6faba3f09cfc.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
|
spmonahan marked this conversation as resolved.
spmonahan marked this conversation as resolved.
spmonahan marked this conversation as resolved.
|
||
| "type": "minor", | ||
| "comment": "feat: disallow direct access to globals", | ||
| "packageName": "@fluentui/eslint-plugin", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
7 changes: 7 additions & 0 deletions
7
change/@fluentui-priority-overflow-3c4d0234-bd4e-473b-9d6f-b4a89e85eb7e.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "chore: disable eslint rule", | ||
| "packageName": "@fluentui/priority-overflow", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-aria-a93678b3-8ffb-47d5-9d3b-1fbf8b4ba011.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "minor", | ||
| "comment": "add optional `window` argument to `scrollIntoView`.", | ||
| "packageName": "@fluentui/react-aria", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-menu-85b57efe-b104-402f-ac09-c78d05848110.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "chore: disable eslint rule.", | ||
| "packageName": "@fluentui/react-menu", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-message-bar-e51754db-df15-41cc-9872-123edeb4990e.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "chore: disable eslint rule", | ||
| "packageName": "@fluentui/react-message-bar", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-popover-83cdc4d1-3431-4143-8e7a-e9afae638791.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "chore: disable eslint rule.", | ||
| "packageName": "@fluentui/react-popover", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-table-ddd67de8-e1fd-4ab5-b0b5-40f161357694.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "fix: use requestAnimationFrame from Fluent context.", | ||
| "packageName": "@fluentui/react-table", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-tabster-fcd4a805-ad5d-4f87-b659-ba102deedd56.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "none", | ||
| "comment": "update eslint comments", | ||
| "packageName": "@fluentui/react-tabster", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "none" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-teaching-popover-bcd345f2-959c-4653-b294-b4bfa456d469.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Use `MutationObserver` from global context.", | ||
| "packageName": "@fluentui/react-teaching-popover", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-toast-fbabe77b-dce1-41c3-9760-2e0786626a05.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "chore: disable eslint rule.", | ||
| "packageName": "@fluentui/react-toast", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-utilities-c872de02-afc7-4b9a-9150-71eec49dcd12.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "fix: use globals from Fluent context.", | ||
| "packageName": "@fluentui/react-utilities", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-virtualizer-80a7f92f-f93e-41be-8cf1-c97f839de717.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "fix: update internal function to optionally use global Fluent context.", | ||
| "packageName": "@fluentui/react-virtualizer", | ||
| "email": "seanmonahan@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.