-
Notifications
You must be signed in to change notification settings - Fork 535
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
Revert "eslint(test-end-to-end-tests): Prefix test-end-to-end-tests before enabling no-unchecked-record-access" #23498
base: main
Are you sure you want to change the base?
Conversation
…efore en…" This reverts commit 2b62d56.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 21 changed files in this pull request and generated no comments.
Files not reviewed (15)
- packages/test/test-end-to-end-tests/src/test/gc/gcTrailingOps.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/data-virtualization/groupIdInSummary.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/gc/gcSweepDataStores.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/gc/gcDatastoreDuplicateRoutes.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/gc/gcTreeSummaryHandles.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/gc/gcSweepAttachmentBlobs.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/idCompressor.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/gc/gcUnreferencedTimestamp.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/gc/gcDeleteObjectsInTestMode.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/summarization/summarizeIncrementally.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/gc/gcSweepUnreferencePhases.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/gc/gcTestSummaryUtils.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/data-virtualization/loadNewerGroupIdSnapshot.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/test/deRehydrateContainerTests.spec.ts: Evaluated as low risk
- packages/test/test-end-to-end-tests/src/mocking.ts: Evaluated as low risk
Comments suppressed due to low confidence (6)
packages/test/test-end-to-end-tests/src/test/benchmark/summarization.memory.spec.ts:86
- Accessing 'summary.tree[".metadata"].content' directly without optional chaining or null check could lead to runtime errors if 'summary.tree[".metadata"]' is undefined.
const metadata = readBlobContent(summary.tree[".metadata"].content) as Record<string, unknown>;
packages/test/test-end-to-end-tests/src/test/benchmark/summarization.memory.spec.ts:99
- Accessing 'summary.tree[channelsTreeName]' directly without optional chaining or null check could lead to runtime errors if 'summary.tree[channelsTreeName]' is undefined.
const channelsTree = summary.tree[channelsTreeName];
packages/test/test-end-to-end-tests/src/test/benchmark/summarization.memory.spec.ts:105
- Accessing 'channelsTree.tree[defaultDataStore._context.id]' directly without optional chaining or null check could lead to runtime errors if 'channelsTree.tree[defaultDataStore._context.id]' is undefined.
const defaultDataStoreNode = channelsTree.tree[defaultDataStore._context.id];
packages/test/test-end-to-end-tests/src/test/benchmark/summarization.memory.spec.ts:115
- Accessing 'defaultDataStoreNode.tree[channelsTreeName]' directly without optional chaining or null check could lead to runtime errors if 'defaultDataStoreNode.tree[channelsTreeName]' is undefined.
const dataStoreChannelsTree = defaultDataStoreNode.tree[channelsTreeName];
packages/test/test-end-to-end-tests/src/test/benchmark/summarization.memory.spec.ts:117
- Accessing 'defaultDataStoreNode.tree[".component"].content' directly without optional chaining or null check could lead to runtime errors if 'defaultDataStoreNode.tree[".component"]' is undefined.
const attributes = readBlobContent(defaultDataStoreNode.tree[".component"].content) as Record<string, unknown>;
packages/test/test-end-to-end-tests/src/test/benchmark/summarization.memory.spec.ts:136
- Accessing 'dataStoreChannelsTree.tree.root' directly without optional chaining or null check could lead to runtime errors if 'dataStoreChannelsTree.tree.root' is undefined.
const defaultDdsNode = dataStoreChannelsTree.tree.root;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⯅ @fluid-example/bundle-size-tests: +245 Bytes
Baseline commit: 46abe82 |
Reverts #23436
Where
?
was used to address linter defect, TypeScript appears to mostly ignore that these cases may lead toundefined
result which is not accepted per type specifications. Use of?
is thus a behavior change that will shift point of failure away from where it could first be detected - revert those behavior changes. (Many of the test uses of?
in original change are permissible as there is a follow-up assertion that will fail. But those were not separated during revert.)Where
T | undefined
was used to address linter defect, TypeScript will narrow withoutundefined
withoutnoUncheckedIndexAccess
enabled. Thus, the code appears more confusing as there is a non-respected type annotation.