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

FED-2854 Fix num keys incorrectly linting as not unique #928

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

greglittlefield-wf
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf commented Jun 21, 2024

Motivation

Setting a key to a value that has a static type of num incorrectly lints as a non-unique key.

..key = aNum
//      ^^^^
// over_react_object_to_string_as_key: Keys shouldn't be derived from 'num.toString()' since the value is the same for all instances. 

This bug is caused by us having cases for int and double, but not for num.

Changes

  • Add case for num type
  • Add regression test

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Frameworks Design member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@aviary2-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@rmconsole6-wk rmconsole6-wk changed the title Fix num keys incorrectly linting as not unique FED-2854 Fix num keys incorrectly linting as not unique Jun 21, 2024
@greglittlefield-wf greglittlefield-wf marked this pull request as ready for review June 21, 2024 20:47
Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

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

+10 🎉

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@rmconsole3-wf rmconsole3-wf merged commit c08e8f6 into master Jun 24, 2024
5 checks passed
@rmconsole3-wf rmconsole3-wf deleted the fix-num-key-warning branch June 24, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants