[eslint-config-universe] Replace usage of var in packages with let or const (#11531)
[lint] Upgrade typescript-eslint parser and plugin (#10387)* [lint] Upgrade typescript-eslint parser and plugin Keeping our linter dependencies up to date. This has better support for optional c
[lint] Upgrade typescript-eslint parser and plugin (#10387)* [lint] Upgrade typescript-eslint parser and plugin Keeping our linter dependencies up to date. This has better support for optional chaining, which we've used more of, and a new scope analysis package. There is one significant breaking change that affects the `no-undef` rule. Now (perhaps with an ESTree upgrade), ESLint looks at TS types in addition to regular JS variables. Many TS types are not explicitly imported (ex: several DOM types that are expected to exist). The simplest way to address this is to follow typescript-eslint's FAQ and disable `no-undef` in favor of letting `tsc` check for non-defined variables: https://github.com/typescript-eslint/typescript-eslint/blob/e26e43ffba96f6d46198b22f1c8dd5c814db2652/docs/getting-started/linting/FAQ.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors Changelog here: https://github.com/typescript-eslint/typescript-eslint/releases/tag/v4.0.0 Tested with `et cp --all --no-test --no-build --no-uniformity-check` * Fix up lint errors and warnings In expo-ads-facebook I needed to add `// eslint-disable-next-line @typescript-eslint/no-redeclare -- the type and variable share a name` per the guidance here: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md > Note: Even with this option set to true, this rule will report if you name a type and a variable the same name. This is intentional. Declaring a variable and a type and a variable the same is usually an accident, and it can lead to hard-to-understand code. If you have a rare case where you're intentionally naming a type the same name as a variable, use a disable comment.
show more ...
[lint] Fix lint errors and warnings in all packages that have the "lint" script definedThis will get the linting feature of `expotools check-packages` passing.
[ios][android][sdk][ncl] Background location, geofencing and background fetch (#2338)# Why Canny issues: - https://expo.canny.io/feature-requests/p/background-tasks-support - https://expo.cann
[ios][android][sdk][ncl] Background location, geofencing and background fetch (#2338)# Why Canny issues: - https://expo.canny.io/feature-requests/p/background-tasks-support - https://expo.canny.io/feature-requests/p/background-location-tracking - https://expo.canny.io/feature-requests/p/geofencing-api Related PR: - https://github.com/expo/universe/pull/3201 (docs) # How The core of this PR is to implement TaskManager that provides an API to manage tasks, especially these that run while the app is in the background. I hope I documented this piece enough so I don't have to write it here again This PR also adds three ways of how we can use background tasks: - Background location updates `Location.startLocationUpdatesAsync`, `Location.stopLocationUpdatesAsync`, `Location.hasStartedLocationUpdatesAsync` - Geofencing `Location.startGeofencingAsync`, `Location.stopGeofencingAsync`, `Location.hasStartedGeofencingAsync` - Background fetch `expo-background-fetch` module, *iOS only so far* Also, to improve the quality of `expo-location`, I've deprecated `enableHighAccuracy` option and introduced a new one called `accuracy`. It allows to use all possible accuracies provided by iOS platform. Android has fewer options of accuracy, but I've made simple mapping (see https://github.com/expo/expo/pull/2338/files#diff-66bdbbc66d3410d9198aa17584b5409eR633). All new modules and `expo-location` are now TypeScripted # Test Plan New APIs examples in `native-component-list`: - `BackgroundFetch` - shows the status and the date of the last background fetch which can be manually triggered in Xcode (Debug -> Simulate background fetch). - `Location` -> `Background location map` - it tracks your location by drawing a polyline. - `Location` -> `Geofencing map` - this one will work better once we merge #2316, as it should show local notifications when the device enters/exits a region. - `TaskManager` - shows all registered tasks for the experience. There are also some quick tests in `test-suite` for the new methods in `Location` and `TaskManager` modules.