-
Notifications
You must be signed in to change notification settings - Fork 536
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
base: main
Are you sure you want to change the base?
Handle nullish coalescing assignment and else case assignment in no-unchecked-record access #23633
Conversation
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 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] = {};
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.
Looking good so far! It may be nice to add a few more comments for people with less context (me 😋)
common/build/eslint-plugin-fluid/src/rules/no-unchecked-record-access.js
Outdated
Show resolved
Hide resolved
common/build/eslint-plugin-fluid/src/rules/no-unchecked-record-access.js
Outdated
Show resolved
Hide resolved
common/build/eslint-plugin-fluid/src/rules/no-unchecked-record-access.js
Outdated
Show resolved
Hide resolved
common/build/eslint-plugin-fluid/src/rules/no-unchecked-record-access.js
Show resolved
Hide resolved
common/build/eslint-plugin-fluid/src/rules/no-unchecked-record-access.js
Outdated
Show resolved
Hide resolved
common/build/eslint-plugin-fluid/src/rules/no-unchecked-record-access.js
Outdated
Show resolved
Hide resolved
common/build/eslint-plugin-fluid/src/rules/no-unchecked-record-access.js
Outdated
Show resolved
Hide resolved
// Additional check for 'in' checks in the same scope | ||
const containingBlock = findContainingBlock(current); | ||
if (containingBlock) { | ||
for (const stmt of containingBlock.body) { |
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.
Can you replace the abbreviation stmt
to its full name?
handle nullish coalescing assignment and else case assignment in no-unchecked-record access