-
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
Prefix no-unchecked-record-access for presence #23581
base: main
Are you sure you want to change the base?
Conversation
let workspaceDatastore = this.datastore[workspaceAddress]; | ||
let workspaceDatastore: ValueElementMap<PresenceStatesSchema> | undefined = this.datastore[workspaceAddress]; |
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.
This type of change does not work. We already need to undo all of the similar changes. See comments in other related PRs. Please do not add more.
mergedData[valueManagerKey] ??= {}; | ||
const oldData = mergedData[valueManagerKey][clientSessionId]; | ||
mergedData[valueManagerKey][clientSessionId] = mergeValueDirectory( | ||
const oldData = mergedData[valueManagerKey]?.[clientSessionId]; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
mergedData[valueManagerKey]![clientSessionId] = mergeValueDirectory( |
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.
This is clearly not problematic. Line 120 ensures that mergedData[valueManagerKey]
is defined.
So ?
is definitely not appropriate.
no-unchecked-record-access is already enabled for this package. Why are there new issues being reported? (If a change in rule pending, did it do better before. The code is correct; so, don't want to see anything flagged here.)
The remaining changes to just enable noUncheckedIndexAccess for presence aren't so bad. |
Prefix no-unchecked-record-access for presence