Commit Graph

6 Commits

Author SHA1 Message Date
Abbey Campbell
a84d2fb6d3 autofix array type definitions 2025-12-22 18:26:38 -08:00
Ryan Stelly
b78be9243d lint rule & autofix for "trailing comma" (#3299)
* (lint) MOB-1063 enforce trailing commas

* autofix trailing commas

* manually fix newly introduced maxlen violations

* add trailing comma convention to i18n build
2025-12-22 20:17:13 -06:00
Johannes Klein
49091f8fc4 Enable React Compiler (#3082)
* Update package.json

* Update package-lock.json

* Enable plugin

* Update package.json

* Update package-lock.json

* Update .eslintrc.js

* Create a new object instead of mutating the existing one

* Update SoundRecorder.js

* Do not mutate prop directly

* Do not mutate store value directly

* Disable compiler for zoom hook

Because it uses reanimated logic, and previous work laid out we should specifically disregard a rule of react here, unsure what to do here for now.

* Move array for tracking results into component

* Disable compiler for StandardCamera

* Do not mutate store value directly

* Disable compiler for FullPageWebView

* Do not mutate route param

* Remove unnecessary check if state is true before setting it to false

* Fix: user might be undefined

* Update reanimated usage with new compiler compliant API

* Fix: taxon might be undefined

* Fix: taxon might be undefined

* Fix: common pitfall of trying to render text outside of Text component

* Update interface

* Add package override

* Update package-lock.json

* Refactor updating of user preferences into User model

* Remove no memo directive from zoom

* Update file imports

* Migrate safeRealmWrite to TS

* Update interface and import path

* Update interface

* Refactor useLocaalObservation hook to not mutate return value of a function that should not be mutated

* Update tests to new return structure

* Remove useSafeRoute hook

We get the same information from error contexts and surrounding documents, and this hook was violating the rules of react by conditionally calling another hook.

* Use optional chaining

* Update TaxonNamesSetting.test.js

* Fix: use optional chaining

* Extend on RNTLs renderHook instead of re-implementing

* Remove unnecessary mock

* Remove unnecessary mock

* Remove unecessary mock

* Remove trailing spaces
2025-09-01 17:06:51 +02:00
Amanda Bullington
502393a5d1 Dev experience: linting for TypeScript (#2933)
* Change TS warning about unused variables to error & support _unused in catch blocks

* Use TS recommended object instead of Object

* Set Function issues to warnings in TS files for later fixing
2025-06-02 09:47:29 -07:00
Amanda Bullington
b3d7368b21 Add error handling for 429 to React Query, including mutations (#2781)
* More error handling for 429 errors, including for mutations

* Handle 429 errors with react query; handle for mutations; include context

* Implement progressive backoff for retries
2025-03-17 16:18:54 -07:00
Amanda Bullington
5945ccc525 Fixes and error handling for API throttling (#1971)
* Add new error type for 429; remove unnecessary logs

* Batch API calls for SpeciesSeenCheckmark

* Remove SpeciesSeenCheckmark test

* Revert logging errors

* Use Set for observedTaxonIds

* Add comments around logger.info statements

* Merge linting update

* More fixes from code review

* Switch to non-authenticated useQuery for fetching taxon ids seen by X user id

* Fix tests
2024-08-14 22:08:03 -07:00