Skip to content

Fix linting for the new repo 2 - #452

Open
LNorman8 wants to merge 41 commits into
devfrom
eslint-setState
Open

LNorman8 wants to merge 41 commits into
devfrom
eslint-setState

Conversation

@LNorman8

@LNorman8 LNorman8 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Chore

Description

Due to a broken config, some errors were previously not showing up. Currently, we're simply allowing the errors on dev, but that's unsustainable. Just 3 days ago (in pr 456) a new one was introduced.
So I started to work on it. It's not done, but the rest can be slowly knocked out as those files are edited for other reasons. Or a new issue can be made to fix them (and the three other ignores that already existed).

Details

What is your discord username?

  • StaleReference

Please link to the related github issue:

  • N/A

Do your changes impact anything else?

  • Uhhhhh. I tried to make sure that everything worked the same, so hopefully no

Any extra notes:

should still be clean and good

LNorman8 added 8 commits June 20, 2026 15:49
Feels wrong, but the chart seems fully fine to me, and I'm not seeing it get set normally either.

But commented out because surely I am missing something and it isn't dead code
Last one I'll just comment out before just tapping out on the assumption I'm missing something
… and we were setting all three to their default values. Thus, we can remove the setState calls without any worry
…ng to Memoize

✖ 10 problems (0 errors, 10 warnings) - All `react-hooks/set-state-in-effect`
@LNorman8 LNorman8 self-assigned this Jun 21, 2026
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

@LNorman8 must be a member of the PV team on Vercel to deploy.
- Click here to add @LNorman8 to the team.
- If you initiated this build, request access.

Learn more about collaboration on Vercel and other options here.

@LNorman8

Copy link
Copy Markdown
Contributor Author

Update: Changing nothing, pnpm exec eslint src gives me 24 problems. pnpm exec eslint --fix src gives 10 problems, but only after I build? I don't understand what is happening or why it is suddenly deciding not to build.

It was building perfectly fine for me last night. And dev builds for me. But my branch no longer does. So that's frustrating

…ere trying to Memoize"

This reverts commit 0d311d7.

This is the one seeming to cause the problems it seems.

(hopefully I'm right and it will go back to 12 for the CI as well)
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pv-frontpage-redux Error Error Jul 27, 2026 6:59pm

Request Review

roguediv and others added 2 commits June 22, 2026 22:50
* Feature/added mobile dontate button to main header (#435)

* installed index lint plugin

* Task/update eslint (#446)

* fixed most linting issues

* fixed header lint issue

* lint fix on date range picker needs testing

* fixed most of the lint issues

* added contracts repo (#447)

* Rebasing with dev

---------

Co-authored-by: sH3llH0und <wyn@progress.win>
LNorman8 added 4 commits July 25, 2026 13:38
I do not understand how setting the url to '/volunteer' (without appending) is supposed to work. But this is the way to do it without a mutability error
…ne in here will be harder.

- UpdatedUser is set in the tsx, which is why we need a new state variable.
- We definitely need to do large scale refactors to reduce the complexity of our stuff (600 line function; CC34; I didn't fully read it to verify my changes)
got the other account details effect fixed. I don't love this solution. I think there's a cleaner way that I'm missing
LNorman8 added 2 commits July 27, 2026 07:56
Trying to merge dev showed that the offending section was modified, so better to just start over

This reverts commit de691fd.
LNorman8 added 7 commits July 27, 2026 10:52
4
(one was removed in the merge)

Remove effect and replace it with a conditional. Rename variable to better explain it's purpose.
The animation should play once, and latch to fully visible
3
Change effect to top level conditional using state variables to determine

Better solution than last time.

If something new starts to set pendingLinkEmail, this solution will still be valid, since a truish value of pendingLinkEmail will always be modified (wrt it being reset to null at the end)
2
Effect triggered on change of Memoized value. Moved effect body into producing function.
1
Set it immediately as the default, and remove it from the effect
Save date between renders.

In total this iPR is a hack job, and we probably could make many of these calculate on the fly rather than cause a rerender.

But it's down to zero warnings which was the request, and nothing is disastrously worse
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.

[Bug]: LINTING

4 participants