Skip to content
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

Handle nullish coalescing assignment and else case assignment in no-unchecked-record access #23633

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

RishhiB
Copy link
Contributor

@RishhiB RishhiB commented Jan 22, 2025

handle nullish coalescing assignment and else case assignment in no-unchecked-record access

@Copilot Copilot bot review requested due to automatic review settings January 22, 2025 21:36
@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • common/build/eslint-plugin-fluid/package.json: Language not supported
Comments suppressed due to low confidence (2)

common/build/eslint-plugin-fluid/src/test/example/no-unchecked-record-access/indexedRecordOfStrings.ts:116

  • The variable 'oldData' is declared but never used. It should be removed to keep the code clean.
const oldData = mergedData[valueManagerKey][nestedDataKey];

common/build/eslint-plugin-fluid/src/test/example/no-unchecked-record-access/indexedRecordOfStrings.ts:133

  • Ensure 'datastore[key]' is defined before accessing it. Add a check or assignment to ensure it is defined.
datastore[key][key] = {};
@RishhiB RishhiB requested a review from a team January 22, 2025 22:27
Copy link
Contributor

@scottn12 scottn12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far! It may be nice to add a few more comments for people with less context (me 😋)

// Additional check for 'in' checks in the same scope
const containingBlock = findContainingBlock(current);
if (containingBlock) {
for (const stmt of containingBlock.body) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace the abbreviation stmt to its full name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants