concord-consortium / codap

CODAP (Common Online Data Analysis Platform)
MIT License
94 stars 38 forks source link

chore: enable `no-constant-binary-expression` lint rule; fix offending code #1384

Closed kswenson closed 1 month ago

kswenson commented 1 month ago

The TypeScript 5.6 beta release notes describes an upcoming feature of TypeScript patterned after a recently added ESLint rule that catches a surprising number of bugs. This PR enables the new lint rule and fixes the code that was found by it. All instances in the v3 code related to confusion around precedence of the ?? operator, which requires additional parentheses to fix.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.71%. Comparing base (b80596b) to head (192d496). Report is 1 commits behind head on main.

Files Patch % Lines
...ndard-error/standard-error-adornment-component.tsx 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1384 +/- ## ========================================== + Coverage 85.63% 85.71% +0.08% ========================================== Files 524 524 Lines 25690 25690 Branches 6560 7001 +441 ========================================== + Hits 22000 22021 +21 + Misses 3535 3391 -144 - Partials 155 278 +123 ``` | [Flag](https://app.codecov.io/gh/concord-consortium/codap/pull/1384/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | Coverage Δ | | |---|---|---| | [cypress](https://app.codecov.io/gh/concord-consortium/codap/pull/1384/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | `72.67% <83.33%> (+0.09%)` | :arrow_up: | | [jest](https://app.codecov.io/gh/concord-consortium/codap/pull/1384/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | `53.42% <0.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cypress[bot] commented 1 month ago



Test summary

200 0 29 0Flakiness 1


Run details

Project codap-v3
Status Passed
Commit 7d25d65b57
Started Jul 31, 2024 7:42 PM
Ended Jul 31, 2024 7:51 PM
Duration 08:55 💡
OS Linux Ubuntu -
Browser Chrome 126

View run in Cypress Cloud ➡️


Flakiness

cypress/e2e/toolbar.spec.ts Flakiness
1 codap toolbar > will open a graph

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud