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

Fix eslint react/jsx-no-bind #1992

Merged

Conversation

atrovato
Copy link
Contributor

Fixes 16 eslint warning: react/jsx-no-bind.

Copy link

codecov bot commented Dec 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (396efc7) 98.19% compared to head (00cafb0) 98.19%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1992   +/-   ##
=======================================
  Coverage   98.19%   98.19%           
=======================================
  Files         786      786           
  Lines       12308    12308           
=======================================
  Hits        12086    12086           
  Misses        222      222           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

relativeci bot commented Dec 23, 2023

Job #2236: Bundle Size — 9.39MiB (+0.02%).

00cafb0(current) vs 396efc7 master#2235(baseline)

Warning

Bundle contains 3 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #2236
     Baseline
Job #2235
Regression  Initial JS 5.18MiB(+0.03%) 5.18MiB
No change  Initial CSS 302.44KiB 302.44KiB
Change  Cache Invalidation 55.09% 53.88%
No change  Chunks 51 51
No change  Assets 158 158
No change  Modules 1425 1425
No change  Duplicate Modules 20 20
No change  Duplicate Code 0.81% 0.81%
No change  Packages 124 124
No change  Duplicate Packages 3 3
Bundle size by type  Change 1 change Regression 1 regression
                 Current
Job #2236
     Baseline
Job #2235
Regression  JS 6.87MiB (+0.02%) 6.87MiB
Not changed  IMG 2.08MiB 2.08MiB
Not changed  CSS 318.94KiB 318.94KiB
Not changed  Fonts 93.55KiB 93.55KiB
Not changed  Other 16.14KiB 16.14KiB
Not changed  HTML 13.58KiB 13.58KiB

View job #2236 reportView atrovato:eslint-fix-jsx-no-bind branch activity

Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

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

Are you sure it works? (tested in real life?)

If there is no bind, the function needs to be:

  • A class attribute function
  • Or the bind needs to be done in the constructor

@atrovato
Copy link
Contributor Author

atrovato commented Jan 7, 2024

You're right.
I tested first, on demo mode (as I can't test with real devices), it was failing.
Now I set method as class attributes, it works.
Thanks @Pierre-Gilles

But I feel a bit sad that warnings are not checked on development phase...

@Pierre-Gilles Pierre-Gilles merged commit dd35b83 into GladysAssistant:master Feb 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants