diff --git a/App/App.tsx b/App/App.tsx
index 1b62029f..3390fa1e 100644
--- a/App/App.tsx
+++ b/App/App.tsx
@@ -31,7 +31,7 @@ import {
FrequencyContextProvider,
getApolloClient,
LocationContextProvider,
- TCacheShape
+ TCacheShape,
} from './stores';
import { setupAmplitude, track } from './util/amplitude';
import { IS_SENTRY_SET_UP, RELEASE_CHANNEL } from './util/constants';
@@ -41,7 +41,7 @@ import { sentryError } from './util/sentry';
if (IS_SENTRY_SET_UP) {
Sentry.init({
dsn: Constants.manifest.extra.sentryPublicDsn,
- debug: true
+ debug: true,
});
Sentry.setRelease(RELEASE_CHANNEL);
@@ -58,10 +58,10 @@ export function App(): React.ReactElement {
Promise.all([
Font.loadAsync({
'gotham-black': require('../assets/fonts/Gotham-Black.ttf'),
- 'gotham-book': require('../assets/fonts/Gotham-Book.ttf')
+ 'gotham-book': require('../assets/fonts/Gotham-Book.ttf'),
}),
// Add Amplitude if available
- setupAmplitude()
+ setupAmplitude(),
])
.then(() => setReady(true))
.catch(sentryError('App'));
@@ -69,14 +69,12 @@ export function App(): React.ReactElement {
useEffect(() => {
// Load the Offix client
- getApolloClient()
- .then(setClient)
- .catch(sentryError('App'));
+ getApolloClient().then(setClient).catch(sentryError('App'));
}, []);
useEffect(() => {
// Track user closing/re-opening the app
- AppState.addEventListener('change', state => {
+ AppState.addEventListener('change', (state) => {
if (state === 'active') {
track('APP_REFOCUS');
} else if (state === 'background') {
@@ -100,7 +98,7 @@ export function App(): React.ReactElement {
)}
{Platform.select({
- ios:
+ ios: ,
})}
diff --git a/App/Screens/About/About.tsx b/App/Screens/About/About.tsx
index b4ddad9f..8e83d84f 100644
--- a/App/Screens/About/About.tsx
+++ b/App/Screens/About/About.tsx
@@ -23,7 +23,7 @@ import {
ScrollView,
StyleSheet,
Text,
- View
+ View,
} from 'react-native';
import { ScrollIntoView, wrapScrollView } from 'react-native-scroll-into-view';
import { scale } from 'react-native-size-matters';
@@ -41,13 +41,13 @@ const scrollViewOptions = {
align: 'top' as 'top',
insets: {
bottom: 0,
- top: scale(theme.spacing.normal)
- }
+ top: scale(theme.spacing.normal),
+ },
};
export const aboutSections = {
aboutBetaInaccurate: 'aboutBetaInaccurate',
- aboutWhyIsTheStationSoFarTitle: 'aboutWhyIsTheStationSoFarTitle'
+ aboutWhyIsTheStationSoFarTitle: 'aboutWhyIsTheStationSoFarTitle',
};
const handleOpenAmaury = (): void => {
@@ -83,58 +83,58 @@ type AboutProps = NavigationInjectedProps<{
const styles = StyleSheet.create({
articleLink: {
...theme.text,
- fontSize: scale(8)
+ fontSize: scale(8),
},
backButton: {
marginBottom: theme.spacing.normal,
- marginTop: theme.spacing.normal
+ marginTop: theme.spacing.normal,
},
credits: {
borderTopColor: theme.iconBackgroundColor,
borderTopWidth: 1,
marginBottom: theme.spacing.normal,
- paddingTop: theme.spacing.big
+ paddingTop: theme.spacing.big,
},
distance: {
borderTopColor: theme.iconBackgroundColor,
borderTopWidth: 1,
marginBottom: theme.spacing.big,
- paddingTop: theme.spacing.big
+ paddingTop: theme.spacing.big,
},
distancePicker: {
...Platform.select({
ios: {
marginBottom: scale(-60),
- marginTop: scale(-40)
- }
- })
+ marginTop: scale(-40),
+ },
+ }),
},
distanceText: {
...theme.text,
fontSize: scale(14),
paddingLeft: theme.spacing.small,
- textTransform: 'capitalize'
+ textTransform: 'capitalize',
},
h2: {
...theme.title,
fontSize: scale(20),
letterSpacing: 0,
lineHeight: scale(24),
- marginBottom: theme.spacing.small
+ marginBottom: theme.spacing.small,
},
micro: {
...Platform.select({
ios: {
- fontFamily: 'Georgia'
+ fontFamily: 'Georgia',
},
android: {
- fontFamily: 'normal'
- }
- })
+ fontFamily: 'normal',
+ },
+ }),
},
section: {
- marginBottom: theme.spacing.big
- }
+ marginBottom: theme.spacing.big,
+ },
});
export function About(props: AboutProps): React.ReactElement {
diff --git a/App/Screens/About/Box/Box.tsx b/App/Screens/About/Box/Box.tsx
index 9c904df9..178c82ac 100644
--- a/App/Screens/About/Box/Box.tsx
+++ b/App/Screens/About/Box/Box.tsx
@@ -31,65 +31,65 @@ const styles = StyleSheet.create({
backgroundColor: 'white',
marginTop: 20,
marginBottom: 10,
- padding: 10
+ padding: 10,
},
boxDescription: {
...theme.text,
fontSize: 9,
lineHeight: 16,
- marginTop: 15
+ marginTop: 15,
},
cigarette: {
left: 6,
position: 'absolute',
- bottom: 12
+ bottom: 12,
},
equal: {
...theme.text,
color: theme.secondaryTextColor,
fontSize: 44,
lineHeight: 44,
- marginHorizontal: 18
+ marginHorizontal: 18,
},
equivalence: {
alignItems: 'center',
flexDirection: 'row',
- justifyContent: 'center'
+ justifyContent: 'center',
},
label: {
...theme.title,
color: theme.secondaryTextColor,
fontSize: 12,
fontWeight: '900',
- letterSpacing: scale(0.5)
+ letterSpacing: scale(0.5),
},
micro: {
...Platform.select({
ios: {
- fontFamily: 'Georgia'
+ fontFamily: 'Georgia',
},
android: {
- fontFamily: 'normal'
- }
- })
+ fontFamily: 'normal',
+ },
+ }),
},
statisticsLeft: {
alignItems: 'flex-end',
justifyContent: 'flex-end',
marginTop: 36,
paddingRight: 10,
- width: 90
+ width: 90,
},
statisticsRight: {
alignItems: 'center',
- width: 90
+ width: 90,
},
value: {
...theme.text,
color: theme.secondaryTextColor,
fontSize: 44,
- lineHeight: 44
- }
+ lineHeight: 44,
+ },
});
export function Box(): React.ReactElement {
diff --git a/App/Screens/About/Language/Language.tsx b/App/Screens/About/Language/Language.tsx
index 2f6ad87c..bc023512 100644
--- a/App/Screens/About/Language/Language.tsx
+++ b/App/Screens/About/Language/Language.tsx
@@ -24,14 +24,14 @@ import * as names from './names.json';
const styles = StyleSheet.create({
container: {
- borderWidth: 0
+ borderWidth: 0,
},
picker: {
height: 1000,
position: 'absolute',
top: 0,
- width: 1000
- }
+ width: 1000,
+ },
});
export function Language(): React.ReactElement {
@@ -55,7 +55,7 @@ export function Language(): React.ReactElement {
selectedValue={i18n.locale}
style={styles.picker}
>
- {Object.keys(i18n.translations).map(lang => (
+ {Object.keys(i18n.translations).map((lang) => (
))}
diff --git a/App/Screens/Details/Details.tsx b/App/Screens/Details/Details.tsx
index ef77177c..57111730 100644
--- a/App/Screens/Details/Details.tsx
+++ b/App/Screens/Details/Details.tsx
@@ -35,14 +35,14 @@ type DetailsProps = NavigationInjectedProps;
const styles = StyleSheet.create({
container: {
- flexGrow: 1
+ flexGrow: 1,
},
map: {
- flexGrow: 1
+ flexGrow: 1,
},
mapContainer: {
- flexGrow: 1
- }
+ flexGrow: 1,
+ },
});
// Holds the ref to the MapView.Marker representing the AQI station
@@ -95,7 +95,7 @@ export function Details(props: DetailsProps): React.ReactElement {
const station = {
description: stationName(api.pm25),
title: stationName(api.pm25),
- ...getCorrectLatLng(currentLocation, api.pm25.coordinates)
+ ...getCorrectLatLng(currentLocation, api.pm25.coordinates),
};
return (
@@ -114,7 +114,7 @@ export function Details(props: DetailsProps): React.ReactElement {
Math.abs(currentLocation.latitude - station.latitude) * 2,
longitude: (currentLocation.longitude + station.longitude) / 2,
longitudeDelta:
- Math.abs(currentLocation.longitude - station.longitude) * 2
+ Math.abs(currentLocation.longitude - station.longitude) * 2,
}}
onMapReady={handleMapReady}
style={styles.map}
diff --git a/App/Screens/Details/Distance/Distance.tsx b/App/Screens/Details/Distance/Distance.tsx
index f0fa6272..3f50a4fc 100644
--- a/App/Screens/Details/Distance/Distance.tsx
+++ b/App/Screens/Details/Distance/Distance.tsx
@@ -29,12 +29,12 @@ interface DistanceProps {
const styles = StyleSheet.create({
banner: {
flexDirection: 'row',
- justifyContent: 'center'
+ justifyContent: 'center',
},
distance: {
...theme.title,
- color: 'white'
- }
+ color: 'white',
+ },
});
export function Distance(props: DistanceProps): React.ReactElement {
@@ -46,7 +46,7 @@ export function Distance(props: DistanceProps): React.ReactElement {
{t('details_distance_label', {
distanceToStation: props.distance,
- distanceUnit
+ distanceUnit,
}).toUpperCase()}
diff --git a/App/Screens/Details/Header/Header.tsx b/App/Screens/Details/Header/Header.tsx
index 884bae54..55250ba6 100644
--- a/App/Screens/Details/Header/Header.tsx
+++ b/App/Screens/Details/Header/Header.tsx
@@ -25,7 +25,7 @@ import {
StyleSheet,
Text,
TextStyle,
- View
+ View,
} from 'react-native';
import locationIcon from '../../../../assets/images/location.png';
@@ -40,10 +40,10 @@ interface HeaderProps {
const styles = StyleSheet.create({
backButton: {
- marginBottom: theme.spacing.normal
+ marginBottom: theme.spacing.normal,
},
changeLocation: {
- marginRight: theme.spacing.normal
+ marginRight: theme.spacing.normal,
},
container: {
...theme.elevationShadowStyle(2, 'bottom'),
@@ -51,33 +51,33 @@ const styles = StyleSheet.create({
backgroundColor: 'white',
paddingBottom: theme.spacing.small,
paddingTop: theme.spacing.normal,
- zIndex: 1
+ zIndex: 1,
},
content: {
- flex: 1
+ flex: 1,
},
currentLocation: {
- marginBottom: theme.spacing.normal
+ marginBottom: theme.spacing.normal,
},
info: {
...theme.text,
- marginVertical: 5
+ marginVertical: 5,
},
label: {
color: theme.primaryColor,
- fontFamily: theme.gothamBlack
+ fontFamily: theme.gothamBlack,
},
layout: {
- flexDirection: 'row'
+ flexDirection: 'row',
},
pollutantItem: {
- flexBasis: '45%'
+ flexBasis: '45%',
},
pollutants: {
flexDirection: 'row',
flexWrap: 'wrap',
- marginTop: theme.spacing.normal
- }
+ marginTop: theme.spacing.normal,
+ },
});
const renderInfo = (
@@ -132,7 +132,7 @@ export function Header(props: HeaderProps): React.ReactElement {
)}
- {api.normalized.map(normalized => {
+ {api.normalized.map((normalized) => {
return renderInfo(
`${normalized.parameter.toUpperCase()} AQI:`,
convert(
diff --git a/App/Screens/ErrorScreen/ErrorScreen.tsx b/App/Screens/ErrorScreen/ErrorScreen.tsx
index 430a36fc..6e05a54a 100644
--- a/App/Screens/ErrorScreen/ErrorScreen.tsx
+++ b/App/Screens/ErrorScreen/ErrorScreen.tsx
@@ -32,28 +32,28 @@ type ErrorScreenProps = NavigationInjectedProps;
const styles = StyleSheet.create({
chooseOther: {
- marginVertical: theme.spacing.normal
+ marginVertical: theme.spacing.normal,
},
container: {
...theme.fullScreen,
...theme.withPadding,
flexGrow: 1,
- flexDirection: 'column'
+ flexDirection: 'column',
},
errorMessage: {
- ...theme.text
+ ...theme.text,
},
errorScrollView: {
flex: 1,
- marginVertical: theme.spacing.small
+ marginVertical: theme.spacing.small,
},
errorText: {
...theme.shitText,
- marginTop: theme.spacing.big
+ marginTop: theme.spacing.big,
},
sorry: {
- color: theme.primaryColor
- }
+ color: theme.primaryColor,
+ },
});
export function ErrorScreen(props: ErrorScreenProps): React.ReactElement {
@@ -93,7 +93,7 @@ export function ErrorScreen(props: ErrorScreenProps): React.ReactElement {
{showDetails ? (
{t('error_screen_error_message', {
- errorText: error && error.message
+ errorText: error && error.message,
})}
) : (
diff --git a/App/Screens/Home/AdditionalInfo/AdditionalInfo.tsx b/App/Screens/Home/AdditionalInfo/AdditionalInfo.tsx
index 8c9df4b2..8a20bd03 100644
--- a/App/Screens/Home/AdditionalInfo/AdditionalInfo.tsx
+++ b/App/Screens/Home/AdditionalInfo/AdditionalInfo.tsx
@@ -20,7 +20,7 @@ import {
Text,
TouchableOpacity,
View,
- ViewProps
+ ViewProps,
} from 'react-native';
import { scale } from 'react-native-size-matters';
import { NavigationInjectedProps } from 'react-navigation';
@@ -43,22 +43,22 @@ interface AdditionalInfoProps extends NavigationInjectedProps, ViewProps {
const styles = StyleSheet.create({
linkToAbout: {
alignItems: 'center',
- flexDirection: 'row'
+ flexDirection: 'row',
},
tag: {
backgroundColor: '#C4C4C4',
borderRadius: scale(10),
marginRight: theme.spacing.mini,
paddingHorizontal: scale(6),
- paddingVertical: scale(3)
+ paddingVertical: scale(3),
},
tagLabel: {
color: 'white',
fontSize: scale(10),
letterSpacing: scale(1),
marginLeft: scale(2),
- textAlign: 'center'
- }
+ textAlign: 'center',
+ },
});
export function AdditionalInfo(
@@ -98,7 +98,7 @@ export function AdditionalInfo(
track('HOME_SCREEN_BETA_INACCURATE_CLICK');
// eslint-disable-next-line
navigation.navigate('About', {
- scrollInto: aboutSections.aboutBetaInaccurate
+ scrollInto: aboutSections.aboutBetaInaccurate,
});
}}
style={styles.linkToAbout}
diff --git a/App/Screens/Home/Footer/Footer.tsx b/App/Screens/Home/Footer/Footer.tsx
index 1deb1cc4..7e1fd622 100644
--- a/App/Screens/Home/Footer/Footer.tsx
+++ b/App/Screens/Home/Footer/Footer.tsx
@@ -35,11 +35,11 @@ const styles = StyleSheet.create({
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'space-between',
- marginTop: theme.spacing.small
+ marginTop: theme.spacing.small,
},
share: {
- marginRight: theme.spacing.small
- }
+ marginRight: theme.spacing.small,
+ },
});
export function Footer(props: FooterProps): React.ReactElement {
@@ -68,7 +68,7 @@ export function Footer(props: FooterProps): React.ReactElement {
function goToAboutWhySoFar(): void {
track('HOME_SCREEN_ABOUT_WHY_SO_FAR_CLICK');
navigation.navigate('About', {
- scrollInto: aboutSections.aboutWhyIsTheStationSoFarTitle
+ scrollInto: aboutSections.aboutWhyIsTheStationSoFarTitle,
});
}
diff --git a/App/Screens/Home/Footer/SelectNotifications/SelectNotifications.tsx b/App/Screens/Home/Footer/SelectNotifications/SelectNotifications.tsx
index 7fc8a982..565d64d9 100644
--- a/App/Screens/Home/Footer/SelectNotifications/SelectNotifications.tsx
+++ b/App/Screens/Home/Footer/SelectNotifications/SelectNotifications.tsx
@@ -34,7 +34,7 @@ import { ApiContext } from '../../../../stores';
import {
useGetOrCreateUser,
USER_VARIABLES,
- useUpdateUser
+ useUpdateUser,
} from '../../../../stores/util';
import { AmplitudeEvent, track } from '../../../../util/amplitude';
import { promiseToTE, retry, sideEffect } from '../../../../util/fp';
@@ -62,7 +62,7 @@ function hex2rgba(hex: string, alpha = 1): string {
throw new Error(`Invalid hex: ${hex}`);
}
- const [r, g, b] = matches.map(x => parseInt(x, 16));
+ const [r, g, b] = matches.map((x) => parseInt(x, 16));
return `rgba(${r},${g},${b},${alpha})`;
}
@@ -72,31 +72,31 @@ type SelectNotificationsProps = ViewProps;
const styles = StyleSheet.create({
container: {
alignItems: 'center',
- flexDirection: 'row'
+ flexDirection: 'row',
},
label: {
...theme.text,
- textTransform: 'uppercase'
+ textTransform: 'uppercase',
},
labelFrequency: {
...theme.text,
color: theme.primaryColor,
fontFamily: theme.gothamBlack,
fontWeight: '900',
- textTransform: 'uppercase'
+ textTransform: 'uppercase',
},
switchCircle: {
borderRadius: scale(11),
height: scale(22),
- width: scale(22)
+ width: scale(22),
},
switchContainer: {
borderRadius: scale(14),
height: scale(28),
marginRight: theme.spacing.small,
padding: scale(3),
- width: scale(48)
- }
+ width: scale(48),
+ },
});
export function SelectNotifications(
@@ -177,18 +177,18 @@ export function SelectNotifications(
'SelectNotifications'
),
{
- retries: 3
+ retries: 3,
}
)
),
- TE.map(expoPushToken => ({
+ TE.map((expoPushToken) => ({
expoPushToken,
frequency,
timezone: Localization.timezone,
- universalId: api.pm25.location
+ universalId: api.pm25.location,
})),
TE.chain(
- sideEffect(notifications =>
+ sideEffect((notifications) =>
TE.rightIO(
C.log(
` - Update user ${JSON.stringify(
@@ -198,20 +198,20 @@ export function SelectNotifications(
)
)
),
- TE.chain(notifications =>
+ TE.chain((notifications) =>
promiseToTE(
() =>
updateUser({
variables: {
...USER_VARIABLES,
- input: { notifications }
- }
+ input: { notifications },
+ },
}),
'SelectNotifications'
)
),
TE.fold(
- error => {
+ (error) => {
sentryError('SelectNotifications')(error);
setOptimisticNotif('never');
@@ -232,9 +232,9 @@ export function SelectNotifications(
actionSheetOptions={{
cancelButtonIndex: 4,
options: notificationsValues
- .map(f => t(`home_frequency_${f}`)) // Translate
+ .map((f) => t(`home_frequency_${f}`)) // Translate
.map(capitalize)
- .concat(t('home_frequency_notifications_cancel'))
+ .concat(t('home_frequency_notifications_cancel')),
}}
amplitudeOpenEvent="HOME_SCREEN_NOTIFICATIONS_OPEN_PICKER"
callback={(buttonIndex): void => {
diff --git a/App/Screens/Home/Footer/ShareButton/ShareButton.tsx b/App/Screens/Home/Footer/ShareButton/ShareButton.tsx
index 74beb579..1e3c15b6 100644
--- a/App/Screens/Home/Footer/ShareButton/ShareButton.tsx
+++ b/App/Screens/Home/Footer/ShareButton/ShareButton.tsx
@@ -32,8 +32,8 @@ const styles = StyleSheet.create({
// to achieve the same result (e.g. with a CSS equivalent of
// `visible: hidden`), then open a PR
left: -9999,
- position: 'absolute'
- }
+ position: 'absolute',
+ },
});
export function ShareButton(props: ShareButtonProps): React.ReactElement {
@@ -55,13 +55,13 @@ export function ShareButton(props: ShareButtonProps): React.ReactElement {
const imageUrl = await captureRef(refViewShot, {
format: 'png',
- quality: 1
+ quality: 1,
});
const message = t('home_share_message', {
city: currentLocation.city
? `in ${currentLocation.city}`
: t('home_share_message_here'),
- cigarettes: Math.ceil(api.shootismoke.dailyCigarettes)
+ cigarettes: Math.ceil(api.shootismoke.dailyCigarettes),
});
const title = t('home_share_title');
diff --git a/App/Screens/Home/Footer/ShareButton/ShareImage/ShareImage.tsx b/App/Screens/Home/Footer/ShareButton/ShareImage/ShareImage.tsx
index 49d20b57..ae7c3333 100644
--- a/App/Screens/Home/Footer/ShareButton/ShareImage/ShareImage.tsx
+++ b/App/Screens/Home/Footer/ShareButton/ShareImage/ShareImage.tsx
@@ -23,18 +23,18 @@ import * as theme from '../../../../../util/theme';
const styles = StyleSheet.create({
cigaretteBlock: {
- marginBottom: theme.spacing.normal
+ marginBottom: theme.spacing.normal,
},
container: {
alignItems: 'center',
flexDirection: 'column',
paddingBottom: theme.spacing.big,
paddingTop: theme.spacing.normal,
- width: 480
+ width: 480,
},
currentLocation: {
- textAlign: 'center'
- }
+ textAlign: 'center',
+ },
});
export function ShareImage(): React.ReactElement {
diff --git a/App/Screens/Home/Header/Header.tsx b/App/Screens/Home/Header/Header.tsx
index 3e1d865a..0629b1ea 100644
--- a/App/Screens/Home/Header/Header.tsx
+++ b/App/Screens/Home/Header/Header.tsx
@@ -20,7 +20,7 @@ import {
Image,
StyleSheet,
Text,
- View
+ View,
} from 'react-native';
import { scale } from 'react-native-size-matters';
@@ -41,21 +41,21 @@ const styles = StyleSheet.create({
...theme.withPadding,
alignItems: 'center',
flexDirection: 'row',
- paddingTop: theme.spacing.normal
+ paddingTop: theme.spacing.normal,
},
currentLocation: {
flex: 1,
- marginRight: theme.spacing.mini
+ marginRight: theme.spacing.mini,
},
distance: {
alignItems: 'center',
flexDirection: 'row',
- marginTop: theme.spacing.mini
+ marginTop: theme.spacing.mini,
},
warning: {
marginRight: theme.spacing.mini,
- marginTop: scale(-2) // FIXME We shouldn't need that, with `alignItems: 'center'` on .distance
- }
+ marginTop: scale(-2), // FIXME We shouldn't need that, with `alignItems: 'center'` on .distance
+ },
});
export function Header(props: HeaderProps): React.ReactElement {
@@ -92,7 +92,7 @@ export function Header(props: HeaderProps): React.ReactElement {
{t('home_header_air_quality_station_distance', {
distanceToStation: distance,
- distanceUnit: shortDistanceUnit
+ distanceUnit: shortDistanceUnit,
})}{' '}
{!isGps && t('home_header_from_search')}
diff --git a/App/Screens/Home/Home.tsx b/App/Screens/Home/Home.tsx
index 1b1d3a3f..80f8ace8 100644
--- a/App/Screens/Home/Home.tsx
+++ b/App/Screens/Home/Home.tsx
@@ -23,7 +23,7 @@ import {
ApiContext,
CurrentLocationContext,
Frequency,
- FrequencyContext
+ FrequencyContext,
} from '../../stores';
import { track, trackScreen } from '../../util/amplitude';
import * as theme from '../../util/theme';
@@ -37,17 +37,17 @@ type HomeProps = NavigationInjectedProps;
const styles = StyleSheet.create({
container: {
- flexGrow: 1
+ flexGrow: 1,
},
footer: {
- marginBottom: theme.spacing.big
+ marginBottom: theme.spacing.big,
},
scroll: {
- flex: 1
+ flex: 1,
},
withMargin: {
- marginTop: theme.spacing.normal
- }
+ marginTop: theme.spacing.normal,
+ },
});
interface Cigarettes {
@@ -87,7 +87,7 @@ export function Home(props: HomeProps): React.ReactElement {
const [cigarettes, setCigarettes] = useState({
count: api.shootismoke.dailyCigarettes,
exact: true,
- frequency
+ frequency,
});
useEffect(() => {
setCigarettes({
@@ -96,7 +96,7 @@ export function Home(props: HomeProps): React.ReactElement {
(frequency === 'daily' ? 1 : frequency === 'weekly' ? 7 : 30),
// Since for weeky and monthyl, we just multiply, it's not exact
exact: frequency === 'daily',
- frequency
+ frequency,
});
}, [api, frequency]);
diff --git a/App/Screens/Home/SelectFrequency/SelectFrequency.tsx b/App/Screens/Home/SelectFrequency/SelectFrequency.tsx
index 623ee549..1b937504 100644
--- a/App/Screens/Home/SelectFrequency/SelectFrequency.tsx
+++ b/App/Screens/Home/SelectFrequency/SelectFrequency.tsx
@@ -25,14 +25,14 @@ import * as theme from '../../../util/theme';
const styles = StyleSheet.create({
boxButton: {
- marginRight: theme.spacing.mini
+ marginRight: theme.spacing.mini,
},
container: {
- flexDirection: 'row'
+ flexDirection: 'row',
},
content: {
- paddingHorizontal: theme.spacing.normal
- }
+ paddingHorizontal: theme.spacing.normal,
+ },
});
export function SelectFrequency(props: ScrollViewProps): React.ReactElement {
@@ -87,7 +87,7 @@ export function SelectFrequency(props: ScrollViewProps): React.ReactElement {
if (scroll && scroll.current) {
scroll.current.scrollTo({
- x: dailyWidth + theme.spacing.mini
+ x: dailyWidth + theme.spacing.mini,
});
}
handleChangeFrequency('weekly');
diff --git a/App/Screens/Home/SmokeVideo/SmokeVideo.tsx b/App/Screens/Home/SmokeVideo/SmokeVideo.tsx
index e2ecbed8..6b699474 100644
--- a/App/Screens/Home/SmokeVideo/SmokeVideo.tsx
+++ b/App/Screens/Home/SmokeVideo/SmokeVideo.tsx
@@ -30,10 +30,10 @@ const styles = StyleSheet.create({
height: Dimensions.get('screen').height,
position: 'absolute',
right: 0,
- width: Dimensions.get('screen').width
+ width: Dimensions.get('screen').width,
},
overlay: {
- flex: 1
+ flex: 1,
},
video: {
bottom: 0,
@@ -41,8 +41,8 @@ const styles = StyleSheet.create({
position: 'absolute',
right: 0,
width: Dimensions.get('screen').width,
- zIndex: -1
- }
+ zIndex: -1,
+ },
});
function getVideoStyle(cigarettes: number): ViewStyle {
@@ -53,7 +53,7 @@ function getVideoStyle(cigarettes: number): ViewStyle {
}
export function SmokeVideo({
- cigarettes
+ cigarettes,
}: SmokeVideoProps): React.ReactElement {
return (
diff --git a/App/Screens/Loading/Background.tsx b/App/Screens/Loading/Background.tsx
index 665a7d6e..cbc8e14d 100644
--- a/App/Screens/Loading/Background.tsx
+++ b/App/Screens/Loading/Background.tsx
@@ -29,8 +29,8 @@ const styles = StyleSheet.create({
alignItems: 'center',
backgroundColor: theme.iconBackgroundColor,
flexGrow: 1,
- justifyContent: 'center'
- }
+ justifyContent: 'center',
+ },
});
export function Background(props: BackgroundProps): React.ReactElement {
diff --git a/App/Screens/Loading/Loading.tsx b/App/Screens/Loading/Loading.tsx
index 18fe6e90..997854ef 100644
--- a/App/Screens/Loading/Loading.tsx
+++ b/App/Screens/Loading/Loading.tsx
@@ -29,13 +29,13 @@ let longWaitingTimeout: number | null = null;
const styles = StyleSheet.create({
dots: {
- color: theme.primaryColor
+ color: theme.primaryColor,
},
text: {
...theme.title,
fontSize: 18,
- textAlign: 'center'
- }
+ textAlign: 'center',
+ },
});
function renderCough(index: number): React.ReactElement {
diff --git a/App/Screens/Screens.tsx b/App/Screens/Screens.tsx
index d6eda4da..86afd729 100644
--- a/App/Screens/Screens.tsx
+++ b/App/Screens/Screens.tsx
@@ -20,13 +20,13 @@ import {
createAppContainer,
CreateNavigatorConfig,
NavigationRoute,
- NavigationStackRouterConfig
+ NavigationStackRouterConfig,
} from 'react-navigation';
import {
createStackNavigator,
NavigationStackConfig,
NavigationStackOptions,
- NavigationStackProp
+ NavigationStackProp,
} from 'react-navigation-stack';
import { Api, ApiContext, ErrorContext } from '../stores';
@@ -49,7 +49,7 @@ function stackNavigatorOptions(
> {
return {
cardStyle: {
- backgroundColor: theme.backgroundColor
+ backgroundColor: theme.backgroundColor,
},
headerMode: 'none',
initialRouteName,
@@ -57,8 +57,8 @@ function stackNavigatorOptions(
// FIXME the `headerVisible` field has been moved away from this config
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
- headerVisible: false
- }
+ headerVisible: false,
+ },
};
}
@@ -69,17 +69,17 @@ const RootStack = createAppContainer(
createStackNavigator(
{
About: {
- screen: About
+ screen: About,
},
Details: {
- screen: Details
+ screen: Details,
},
Home: {
- screen: Home
+ screen: Home,
},
Search: {
- screen: Search
- }
+ screen: Search,
+ },
},
stackNavigatorOptions('Home')
)
@@ -92,11 +92,11 @@ const ErrorStack = createAppContainer(
createStackNavigator(
{
Error: {
- screen: ErrorScreen
+ screen: ErrorScreen,
},
Search: {
- screen: Search
- }
+ screen: Search,
+ },
},
stackNavigatorOptions('Error')
)
diff --git a/App/Screens/Search/AlgoliaItem/AlgoliaItem.tsx b/App/Screens/Search/AlgoliaItem/AlgoliaItem.tsx
index 025dca8b..fa3edbd1 100644
--- a/App/Screens/Search/AlgoliaItem/AlgoliaItem.tsx
+++ b/App/Screens/Search/AlgoliaItem/AlgoliaItem.tsx
@@ -38,17 +38,17 @@ export function AlgoliaItem(props: ItemProps): React.ReactElement {
localeNames[0],
city,
county && county.length ? county[0] : null,
- country
+ country,
]
- .filter(_ => _)
- .join(', ')
+ .filter((_) => _)
+ .join(', '),
});
};
return (
_)
+ .filter((_) => _)
.join(', ')}
icon="pin"
onPress={handleClick}
diff --git a/App/Screens/Search/Search.tsx b/App/Screens/Search/Search.tsx
index 23fc392e..7d7e510c 100644
--- a/App/Screens/Search/Search.tsx
+++ b/App/Screens/Search/Search.tsx
@@ -25,7 +25,7 @@ import { BackButton, ListSeparator } from '../../components';
import {
CurrentLocationContext,
FrequencyContext,
- GpsLocationContext
+ GpsLocationContext,
} from '../../stores';
import { Location } from '../../stores/util/fetchGpsPosition';
import { track, trackScreen } from '../../util/amplitude';
@@ -44,19 +44,19 @@ type SearchProps = NavigationInjectedProps;
const styles = StyleSheet.create({
backButton: {
...theme.withPadding,
- marginVertical: theme.spacing.normal
+ marginVertical: theme.spacing.normal,
},
container: {
- flexGrow: 1
+ flexGrow: 1,
},
list: {
- flex: 1
+ flex: 1,
},
noResults: {
...theme.text,
...theme.withPadding,
- marginTop: theme.spacing.normal
- }
+ marginTop: theme.spacing.normal,
+ },
});
function renderSeparator(): React.ReactElement {
@@ -97,13 +97,13 @@ export function Search(props: SearchProps): React.ReactElement {
pipe(
fetchAlgolia(s, gps),
TE.fold(
- err => {
+ (err) => {
setLoading(false);
setAlgoliaError(err);
return T.of(undefined);
},
- hits => {
+ (hits) => {
setLoading(false);
setAlgoliaError(undefined);
setHits(hits);
diff --git a/App/Screens/Search/SearchHeader/SearchHeader.tsx b/App/Screens/Search/SearchHeader/SearchHeader.tsx
index 3ee738a7..ed4e9f4c 100644
--- a/App/Screens/Search/SearchHeader/SearchHeader.tsx
+++ b/App/Screens/Search/SearchHeader/SearchHeader.tsx
@@ -29,20 +29,20 @@ interface SearchHeaderProps {
const styles = StyleSheet.create({
container: {
- backgroundColor: theme.primaryColor
+ backgroundColor: theme.primaryColor,
},
content: {
...theme.withPadding,
alignItems: 'center',
flexDirection: 'row',
- height: 48
+ height: 48,
},
input: {
...theme.text,
color: 'white',
flexGrow: 1,
- fontSize: 13
- }
+ fontSize: 13,
+ },
});
export function SearchHeader(props: SearchHeaderProps): React.ReactElement {
diff --git a/App/Screens/Search/fetchAlgolia.ts b/App/Screens/Search/fetchAlgolia.ts
index f4f5007f..603c5465 100644
--- a/App/Screens/Search/fetchAlgolia.ts
+++ b/App/Screens/Search/fetchAlgolia.ts
@@ -31,7 +31,7 @@ const algoliaUrls = [
'https://places-dsn.algolia.net',
'https://places-1.algolianet.com',
'https://places-2.algolianet.com',
- 'https://places-3.algolianet.com'
+ 'https://places-3.algolianet.com',
];
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/132720a17e15cdfcffade54dd4a23a21c1e16831/types/algoliasearch/index.d.ts#L2072
@@ -40,25 +40,25 @@ const AlgoliaHitT = t.exact(
t.type({
_geoloc: t.type({
lat: t.number,
- lng: t.number
+ lng: t.number,
}),
country: t.string,
// eslint-disable-next-line
locale_names: t.array(t.string),
- objectID: t.string
+ objectID: t.string,
}),
t.partial({
city: t.array(t.string),
- county: t.array(t.string)
- })
+ county: t.array(t.string),
+ }),
])
);
export type AlgoliaHit = t.TypeOf;
const AxiosResponseT = t.type({
data: t.type({
- hits: t.array(AlgoliaHitT)
- })
+ hits: t.array(AlgoliaHitT),
+ }),
});
export function fetchAlgolia(
@@ -66,7 +66,7 @@ export function fetchAlgolia(
gps?: LatLng
): TE.TaskEither {
return retry(
- status =>
+ (status) =>
pipe(
TE.rightIO(
C.log(
@@ -88,26 +88,26 @@ export function fetchAlgolia(
: undefined,
hitsPerPage: 10,
language: 'en',
- query: search
+ query: search,
},
{
- timeout: 5000
+ timeout: 5000,
}
),
'fetchAlgolia'
)
),
- TE.chain(response =>
+ TE.chain((response) =>
T.of(
pipe(
AxiosResponseT.decode(response),
E.mapLeft(failure),
- E.mapLeft(errs => errs[0]), // Only show 1st error
+ E.mapLeft((errs) => errs[0]), // Only show 1st error
E.mapLeft(Error)
)
)
),
- TE.map(response => response.data.hits),
+ TE.map((response) => response.data.hits),
TE.chain(
sideEffect((hits: AlgoliaHit[]) =>
TE.rightIO(
@@ -117,7 +117,7 @@ export function fetchAlgolia(
)
),
{
- retries: algoliaUrls.length
+ retries: algoliaUrls.length,
}
);
}
diff --git a/App/components/ActionPicker/ActionPicker.tsx b/App/components/ActionPicker/ActionPicker.tsx
index 7a318069..f828b9a5 100644
--- a/App/components/ActionPicker/ActionPicker.tsx
+++ b/App/components/ActionPicker/ActionPicker.tsx
@@ -16,7 +16,7 @@
import {
ActionSheetOptions,
- useActionSheet
+ useActionSheet,
} from '@expo/react-native-action-sheet';
import React from 'react';
import { TouchableOpacity, TouchableOpacityProps } from 'react-native';
diff --git a/App/components/BackButton/BackButton.tsx b/App/components/BackButton/BackButton.tsx
index eca0d7f4..4e1bb672 100644
--- a/App/components/BackButton/BackButton.tsx
+++ b/App/components/BackButton/BackButton.tsx
@@ -23,7 +23,7 @@ import {
Text,
TouchableOpacity,
View,
- ViewStyle
+ ViewStyle,
} from 'react-native';
import backIcon from '../../../assets/images/back.png';
@@ -38,12 +38,12 @@ interface BackButtonProps {
const styles = StyleSheet.create({
backButton: {
alignItems: 'center',
- flexDirection: 'row'
+ flexDirection: 'row',
},
backText: {
...theme.text,
- marginLeft: 9
- }
+ marginLeft: 9,
+ },
});
export function BackButton(props: BackButtonProps): React.ReactElement {
diff --git a/App/components/Banner/Banner.tsx b/App/components/Banner/Banner.tsx
index 4a34db76..d149964b 100644
--- a/App/components/Banner/Banner.tsx
+++ b/App/components/Banner/Banner.tsx
@@ -21,7 +21,7 @@ import {
StyleSheet,
TouchableHighlight,
View,
- ViewStyle
+ ViewStyle,
} from 'react-native';
import * as theme from '../../util/theme';
@@ -38,14 +38,14 @@ interface BannerProps {
const styles = StyleSheet.create({
container: {
backgroundColor: theme.primaryColor,
- zIndex: 1
+ zIndex: 1,
},
content: {
...theme.withPadding,
alignItems: 'center',
flexDirection: 'row',
- height: 48
- }
+ height: 48,
+ },
});
export function Banner({
@@ -54,7 +54,7 @@ export function Banner({
elevated,
onClick,
shadowPosition = 'bottom',
- style
+ style,
}: BannerProps): React.ReactElement {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const Wrapper: any = asTouchable ? TouchableHighlight : View;
@@ -69,7 +69,7 @@ export function Banner({
: null,
elevated === 'very'
? theme.elevationShadowStyle(10, shadowPosition)
- : null
+ : null,
]}
underlayColor={asTouchable ? theme.primaryColor : undefined} // https://github.com/facebook/react-native/issues/11834
>
diff --git a/App/components/BoxButton/BoxButton.tsx b/App/components/BoxButton/BoxButton.tsx
index c6d15479..47853aeb 100644
--- a/App/components/BoxButton/BoxButton.tsx
+++ b/App/components/BoxButton/BoxButton.tsx
@@ -20,7 +20,7 @@ import {
Text,
TouchableWithoutFeedback,
TouchableWithoutFeedbackProps,
- View
+ View,
} from 'react-native';
import { scale } from 'react-native-size-matters';
@@ -33,7 +33,7 @@ interface BoxButtonProps extends TouchableWithoutFeedbackProps {
const styles = StyleSheet.create({
activeText: {
- opacity: 1
+ opacity: 1,
},
boxButton: {
...theme.elevationShadowStyle(3),
@@ -44,13 +44,13 @@ const styles = StyleSheet.create({
marginBottom: theme.spacing.mini,
paddingHorizontal: theme.spacing.small,
paddingVertical: scale(6), // Padding for the shadow
- shadowOpacity: 0.1
+ shadowOpacity: 0.1,
},
boxButtonText: {
...theme.shitText,
opacity: theme.disabledOpacity,
- textAlign: 'center'
- }
+ textAlign: 'center',
+ },
});
export function BoxButton(props: BoxButtonProps): React.ReactElement {
diff --git a/App/components/Button/Button.tsx b/App/components/Button/Button.tsx
index 76e9d79f..f59349a7 100644
--- a/App/components/Button/Button.tsx
+++ b/App/components/Button/Button.tsx
@@ -21,7 +21,7 @@ import {
Text,
TouchableOpacity,
TouchableOpacityProps,
- View
+ View,
} from 'react-native';
import { scale } from 'react-native-size-matters';
@@ -39,20 +39,20 @@ const styles = StyleSheet.create({
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'space-around',
- paddingVertical: theme.spacing.mini
+ paddingVertical: theme.spacing.mini,
},
buttonText: {
...theme.title,
- color: theme.primaryColor
+ color: theme.primaryColor,
},
icon: {
- marginRight: theme.spacing.mini
+ marginRight: theme.spacing.mini,
},
primary: {
borderColor: theme.primaryColor,
borderRadius: scale(24),
- borderWidth: scale(2)
- }
+ borderWidth: scale(2),
+ },
});
export function Button(props: ButtonProps): React.ReactElement {
@@ -74,7 +74,7 @@ export function Button(props: ButtonProps): React.ReactElement {
style={[
styles.button,
type === 'primary' ? styles.primary : undefined,
- style
+ style,
]}
{...rest}
>
diff --git a/App/components/ChangeLocation/ChangeLocation.tsx b/App/components/ChangeLocation/ChangeLocation.tsx
index 12e5f829..f69969fc 100644
--- a/App/components/ChangeLocation/ChangeLocation.tsx
+++ b/App/components/ChangeLocation/ChangeLocation.tsx
@@ -20,7 +20,7 @@ import {
Text,
TouchableOpacity,
TouchableOpacityProps,
- View
+ View,
} from 'react-native';
import { scale } from 'react-native-size-matters';
@@ -33,12 +33,12 @@ type ChangeLocationProps = TouchableOpacityProps;
const styles = StyleSheet.create({
container: {
flexDirection: 'column',
- justifyContent: 'center'
+ justifyContent: 'center',
},
icon: {
alignSelf: 'center',
paddingTop: scale(2), // Empirically looks most centered
- marginBottom: theme.spacing.tiny
+ marginBottom: theme.spacing.tiny,
},
label: {
color: theme.primaryColor,
@@ -47,8 +47,8 @@ const styles = StyleSheet.create({
letterSpacing: 0,
lineHeight: scale(10),
textAlign: 'center',
- textTransform: 'uppercase'
- }
+ textTransform: 'uppercase',
+ },
});
export function ChangeLocation(props: ChangeLocationProps): React.ReactElement {
diff --git a/App/components/CigaretteBlock/CigaretteBlock.tsx b/App/components/CigaretteBlock/CigaretteBlock.tsx
index 4373db4d..b12449b2 100644
--- a/App/components/CigaretteBlock/CigaretteBlock.tsx
+++ b/App/components/CigaretteBlock/CigaretteBlock.tsx
@@ -36,18 +36,18 @@ const styles = StyleSheet.create({
animationContainer: {
display: 'flex',
height: scale(CIGARETTES_HEIGHT),
- justifyContent: 'flex-end'
+ justifyContent: 'flex-end',
},
cigarettesCount: {
- color: theme.primaryColor
+ color: theme.primaryColor,
},
lottie: {
- backgroundColor: theme.backgroundColor
+ backgroundColor: theme.backgroundColor,
},
shit: {
...theme.shitText,
- marginTop: theme.spacing.normal
- }
+ marginTop: theme.spacing.normal,
+ },
});
function getSwearWord(cigaretteCount: number): string {
@@ -100,7 +100,7 @@ export function CigaretteBlock(props: CigaretteBlockProps): React.ReactElement {
cigarettesRounded === 1
? t('home_cigarettes_cigarette').toLowerCase()
: t('home_cigarettes_cigarettes').toLowerCase(),
- cigarettes: cigarettesRounded
+ cigarettes: cigarettesRounded,
});
const [firstPartText, secondPartText] = text.split('<');
diff --git a/App/components/CigaretteBlock/swearWords.ts b/App/components/CigaretteBlock/swearWords.ts
index 4c4fd804..1d9e4dd8 100644
--- a/App/components/CigaretteBlock/swearWords.ts
+++ b/App/components/CigaretteBlock/swearWords.ts
@@ -23,5 +23,5 @@ export default [
t('home_swear_word_geez'),
t('home_swear_word_omg'),
t('home_swear_word_crap'),
- t('home_swear_word_arrgh')
+ t('home_swear_word_arrgh'),
];
diff --git a/App/components/Cigarettes/Cigarette/Cigarette.tsx b/App/components/Cigarettes/Cigarette/Cigarette.tsx
index 2985e82a..c2e63c24 100644
--- a/App/components/Cigarettes/Cigarette/Cigarette.tsx
+++ b/App/components/Cigarettes/Cigarette/Cigarette.tsx
@@ -43,19 +43,19 @@ const styles = StyleSheet.create({
bottom: 0,
position: 'absolute',
left: 0,
- resizeMode: 'contain'
+ resizeMode: 'contain',
},
cigarette: {
- flexGrow: 1
+ flexGrow: 1,
},
container: {
- overflow: 'hidden'
+ overflow: 'hidden',
},
diagonal: {
height: Math.floor(scale(CIGARETTES_HEIGHT) / Math.SQRT2),
position: 'absolute',
transform: [{ rotate: '45deg' }, { scale: 1 }],
- width: Math.floor(scale(CIGARETTES_HEIGHT) / Math.SQRT2)
+ width: Math.floor(scale(CIGARETTES_HEIGHT) / Math.SQRT2),
},
head: {
flexGrow: 1,
@@ -63,8 +63,8 @@ const styles = StyleSheet.create({
resizeMode: 'contain',
right: 0,
top: 0,
- zIndex: 1
- }
+ zIndex: 1,
+ },
});
function getCigaretteActualLength(length: number, percentage: number): number {
@@ -85,21 +85,21 @@ function getMeasures(size: CigaretteSize, percentage: number): ViewStyle {
return {
height: Math.ceil(scale(13)),
margin: Math.ceil(scale(12)),
- width: getCigaretteActualLength(185, percentage)
+ width: getCigaretteActualLength(185, percentage),
};
}
case 'medium': {
return {
height: Math.ceil(scale(7)),
margin: Math.ceil(scale(6)),
- width: getCigaretteActualLength(CIGARETTES_HEIGHT, percentage)
+ width: getCigaretteActualLength(CIGARETTES_HEIGHT, percentage),
};
}
case 'small': {
return {
height: Math.ceil(scale(4)),
margin: Math.ceil(scale(3)),
- width: getCigaretteActualLength(41, percentage)
+ width: getCigaretteActualLength(41, percentage),
};
}
}
@@ -118,7 +118,7 @@ function getStyle(
height: height,
marginTop: margin,
marginRight: 100,
- width: width
+ width: width,
};
}
case 'vertical': {
@@ -126,7 +126,7 @@ function getStyle(
height: width,
marginRight: margin,
marginTop: Math.ceil(scale(4)),
- width: height
+ width: height,
};
}
default:
@@ -145,7 +145,7 @@ function renderCigarette(
style={[
styles.container,
getStyle(orientation, percentage, size),
- additionalStyle
+ additionalStyle,
]}
>
@@ -182,7 +182,7 @@ export function Cigarette(props: CigaretteProps): React.ReactElement {
percentage >= 0.3
? { paddingTop: -(30 / 0.7) * percentage + 30 / 0.7 } // very empirical
: undefined,
- style
+ style,
]}
>
{renderCigarette(
diff --git a/App/components/Cigarettes/Cigarettes.tsx b/App/components/Cigarettes/Cigarettes.tsx
index 365b62ac..5f613a2d 100644
--- a/App/components/Cigarettes/Cigarettes.tsx
+++ b/App/components/Cigarettes/Cigarettes.tsx
@@ -39,13 +39,13 @@ const styles = StyleSheet.create({
alignItems: 'flex-end',
flexDirection: 'row',
height: scale(CIGARETTES_HEIGHT),
- width: scale(250)
+ width: scale(250),
},
innerContainer: {
alignItems: 'flex-end',
flexDirection: 'row',
- flexWrap: 'wrap'
- }
+ flexWrap: 'wrap',
+ },
});
export function Cigarettes(props: CigarettesProps): React.ReactElement {
diff --git a/App/components/CircleButton/CircleButton.tsx b/App/components/CircleButton/CircleButton.tsx
index c6dd9146..37ab07e0 100644
--- a/App/components/CircleButton/CircleButton.tsx
+++ b/App/components/CircleButton/CircleButton.tsx
@@ -32,18 +32,18 @@ const styles = StyleSheet.create({
circle: {
height: scale(36),
paddingVertical: 0,
- width: scale(36)
+ width: scale(36),
},
invertedCircle: {
backgroundColor: theme.primaryColor,
- borderWidth: 0
+ borderWidth: 0,
},
label: {
...theme.title,
color: theme.primaryColor,
fontSize: scale(9),
- letterSpacing: 0
- }
+ letterSpacing: 0,
+ },
});
/**
@@ -62,9 +62,7 @@ function renderIconOrText(
/>
) : text ? (
{text}
- ) : (
- undefined
- );
+ ) : undefined;
}
export function CircleButton(props: CircleButtonProps): React.ReactElement {
@@ -75,7 +73,7 @@ export function CircleButton(props: CircleButtonProps): React.ReactElement {
style={[
styles.circle,
inverted ? styles.invertedCircle : undefined,
- style
+ style,
]}
{...rest}
>
diff --git a/App/components/CurrentLocation/CurrentLocation.tsx b/App/components/CurrentLocation/CurrentLocation.tsx
index f2e6bc64..b413b4a1 100644
--- a/App/components/CurrentLocation/CurrentLocation.tsx
+++ b/App/components/CurrentLocation/CurrentLocation.tsx
@@ -31,8 +31,8 @@ interface CurrentLocationProps extends TextProps {
const styles = StyleSheet.create({
title: {
- ...theme.title
- }
+ ...theme.title,
+ },
});
export function CurrentLocation(
diff --git a/App/components/ListItem/ListItem.tsx b/App/components/ListItem/ListItem.tsx
index 12464698..474712b1 100644
--- a/App/components/ListItem/ListItem.tsx
+++ b/App/components/ListItem/ListItem.tsx
@@ -21,7 +21,7 @@ import {
Text,
TouchableOpacity,
TouchableOpacityProps,
- View
+ View,
} from 'react-native';
import gpsIcon from '../../../assets/images/location-big.png';
@@ -39,17 +39,17 @@ const styles = StyleSheet.create({
...theme.withPadding,
alignItems: 'center',
flexDirection: 'row',
- paddingVertical: theme.spacing.normal
+ paddingVertical: theme.spacing.normal,
},
description: {
- ...theme.text
+ ...theme.text,
},
result: {
- marginLeft: theme.spacing.normal
+ marginLeft: theme.spacing.normal,
},
title: {
- ...theme.title
- }
+ ...theme.title,
+ },
});
export function ListItem(props: ListItemProps): React.ReactElement {
diff --git a/App/components/ListSeparator/ListSeparator.tsx b/App/components/ListSeparator/ListSeparator.tsx
index e4355103..03f70956 100644
--- a/App/components/ListSeparator/ListSeparator.tsx
+++ b/App/components/ListSeparator/ListSeparator.tsx
@@ -23,8 +23,8 @@ const styles = StyleSheet.create({
separator: {
backgroundColor: '#D2D2D2',
height: 1,
- marginHorizontal: theme.spacing.normal
- }
+ marginHorizontal: theme.spacing.normal,
+ },
});
export function ListSeparator(): React.ReactElement {
diff --git a/App/localization/index.ts b/App/localization/index.ts
index 3ef729b9..5034f746 100644
--- a/App/localization/index.ts
+++ b/App/localization/index.ts
@@ -23,7 +23,7 @@ import en from './languages/en.json';
i18n.fallbacks = true;
i18n.translations = {
en,
- 'en-US': enUS
+ 'en-US': enUS,
};
// If the locale is en-US, then we use the `en-US` file. For any other locale,
diff --git a/App/stores/api.tsx b/App/stores/api.tsx
index ade895d8..17f21085 100644
--- a/App/stores/api.tsx
+++ b/App/stores/api.tsx
@@ -18,7 +18,7 @@ import {
LatLng,
Normalized,
OpenAQFormat,
- ProviderPromise
+ ProviderPromise,
} from '@shootismoke/dataproviders';
import { aqicn, openaq } from '@shootismoke/dataproviders/lib/promise';
import Constants from 'expo-constants';
@@ -63,8 +63,8 @@ function filterPm25(normalized: Normalized): Api {
normalized,
pm25: pm25[0],
shootismoke: {
- dailyCigarettes: pm25ToCigarettes(pm25[0].value)
- }
+ dailyCigarettes: pm25ToCigarettes(pm25[0].value),
+ },
};
} else {
throw new Error(
@@ -97,12 +97,12 @@ function raceApi(gps: LatLng): TE.TaskEither {
// Run these tasks parallely
const tasks = [
fetchForProvider(aqicn, {
- token: Constants.manifest.extra.aqicnToken
+ token: Constants.manifest.extra.aqicnToken,
}),
fetchForProvider(openaq, {
limit: 1,
- parameter: ['pm25']
- })
+ parameter: ['pm25'],
+ }),
];
return promiseToTE(
@@ -131,7 +131,7 @@ interface ApiContextProviderProps {
}
export function ApiContextProvider({
- children
+ children,
}: ApiContextProviderProps): React.ReactElement {
const { currentLocation, setCurrentLocation } = useContext(
CurrentLocationContext
@@ -153,13 +153,13 @@ export function ApiContextProvider({
pipe(
raceApi(currentLocation),
TE.fold(
- error => {
+ (error) => {
setError(error);
track('API_DAILY_ERROR');
return T.of(undefined);
},
- newApi => {
+ (newApi) => {
setApi(newApi);
track('API_DAILY_RESPONSE');
diff --git a/App/stores/apollo.ts b/App/stores/apollo.ts
index 24e47532..fa8fbd7d 100644
--- a/App/stores/apollo.ts
+++ b/App/stores/apollo.ts
@@ -18,7 +18,7 @@ import {
ApolloClient,
createHttpLink,
from,
- InMemoryCache
+ InMemoryCache,
} from '@apollo/client';
import { ErrorResponse, onError } from '@apollo/link-error';
import { RetryLink } from '@apollo/link-retry';
@@ -33,7 +33,7 @@ import {
credentials,
handleStaleTimestamp,
HAWK_STALE_TIMESTAMP,
- hawkFetch
+ hawkFetch,
} from './util';
const BACKEND_URI = IS_PROD
@@ -53,7 +53,7 @@ let _client: ApolloClient;
*/
function handleApolloError({
graphQLErrors,
- networkError
+ networkError,
}: ErrorResponse): void {
// Send errors to Sentry
if (networkError) {
@@ -95,7 +95,7 @@ export async function getApolloClient(): Promise> {
cache,
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore FIXME, I don't know how to fix here
- storage: AsyncStorage
+ storage: AsyncStorage,
});
const client = new ApolloClient({
@@ -106,11 +106,11 @@ export async function getApolloClient(): Promise> {
// Retry on error
new RetryLink(),
// Classic HTTP link
- createHttpLink({ fetch: hawkFetch(BACKEND_URI), uri: BACKEND_URI })
+ createHttpLink({ fetch: hawkFetch(BACKEND_URI), uri: BACKEND_URI }),
]),
name: 'shootismoke-expo',
typeDefs: [userSchema],
- version: `v${Constants.manifest.version}`
+ version: `v${Constants.manifest.version}`,
});
_client = client;
diff --git a/App/stores/distanceUnit.tsx b/App/stores/distanceUnit.tsx
index f41ded8e..1ccb8a7c 100644
--- a/App/stores/distanceUnit.tsx
+++ b/App/stores/distanceUnit.tsx
@@ -35,11 +35,11 @@ interface ContextType {
const Context = createContext({
distanceUnit: 'km',
localizedDistanceUnit: () => '',
- setDistanceUnit: noop
+ setDistanceUnit: noop,
});
export function DistanceUnitProvider({
- children
+ children,
}: {
children: React.ReactNode;
}): React.ReactElement {
diff --git a/App/stores/error.tsx b/App/stores/error.tsx
index d84e80d7..9d38ef3b 100644
--- a/App/stores/error.tsx
+++ b/App/stores/error.tsx
@@ -25,11 +25,11 @@ interface Context {
export const ErrorContext = createContext({
error: undefined,
- setError: noop
+ setError: noop,
});
export function ErrorContextProvider({
- children
+ children,
}: {
children: JSX.Element;
}): React.ReactElement {
diff --git a/App/stores/frequency.tsx b/App/stores/frequency.tsx
index 1e383a1e..d417288e 100644
--- a/App/stores/frequency.tsx
+++ b/App/stores/frequency.tsx
@@ -27,11 +27,11 @@ interface Context {
export const FrequencyContext = createContext({
frequency: 'daily',
- setFrequency: noop
+ setFrequency: noop,
});
export function FrequencyContextProvider({
- children
+ children,
}: {
children: JSX.Element;
}): React.ReactElement {
@@ -41,7 +41,7 @@ export function FrequencyContextProvider({
{children}
diff --git a/App/stores/location.tsx b/App/stores/location.tsx
index 8340df9e..1ed659c4 100644
--- a/App/stores/location.tsx
+++ b/App/stores/location.tsx
@@ -27,12 +27,12 @@ import { ErrorContext } from './error';
import {
fetchGpsPosition,
fetchReverseGeocode,
- Location
+ Location,
} from './util/fetchGpsPosition';
const DEFAULT_LAT_LNG: LatLng = {
latitude: 0,
- longitude: 0
+ longitude: 0,
};
interface LocationWithSetter {
@@ -47,11 +47,11 @@ export const GpsLocationContext = createContext(
export const CurrentLocationContext = createContext({
...DEFAULT_LAT_LNG,
isGps: false,
- setCurrentLocation: noop
+ setCurrentLocation: noop,
});
export function LocationContextProvider({
- children
+ children,
}: {
children: JSX.Element;
}): React.ReactElement {
@@ -66,7 +66,7 @@ export function LocationContextProvider({
fetchGpsPosition(),
TE.map(({ coords }) => coords),
TE.chain(
- sideEffect(gps => {
+ sideEffect((gps) => {
// Set lat/lng for now, set the reverse location later
// @see https://github.com/amaurymartiny/shoot-i-smoke/issues/323
console.log(
@@ -80,7 +80,7 @@ export function LocationContextProvider({
return TE.right(undefined);
})
),
- TE.chain(gps =>
+ TE.chain((gps) =>
TE.rightTask(
pipe(
fetchReverseGeocode(gps),
@@ -89,12 +89,12 @@ export function LocationContextProvider({
)
),
TE.fold(
- err => {
+ (err) => {
setError(err);
return T.of(undefined);
},
- location => {
+ (location) => {
console.log(
` - Got reverse location ${JSON.stringify(
location
@@ -119,7 +119,7 @@ export function LocationContextProvider({
!!gpsLocation &&
currentLocation.latitude === gpsLocation.latitude &&
currentLocation.longitude === gpsLocation.longitude,
- setCurrentLocation
+ setCurrentLocation,
}}
>
{children}
diff --git a/App/stores/util/fetchGpsPosition.ts b/App/stores/util/fetchGpsPosition.ts
index f1e2abe3..5b2e1ea2 100644
--- a/App/stores/util/fetchGpsPosition.ts
+++ b/App/stores/util/fetchGpsPosition.ts
@@ -36,21 +36,21 @@ export function fetchReverseGeocode(
() => ExpoLocation.reverseGeocodeAsync(currentLocation),
'fetchReverseGeocode'
),
- TE.chain(reverse =>
+ TE.chain((reverse) =>
reverse.length
? TE.right(reverse[0])
: TE.left(new Error('Reverse geocoding returned no results'))
),
- TE.map(reverse => ({
+ TE.map((reverse) => ({
...currentLocation,
city: reverse.city,
country: reverse.country,
name:
[reverse.street, reverse.city, reverse.country]
- .filter(x => x)
+ .filter((x) => x)
.join(', ') ||
// This case happens when e.g. we're in the middle of the ocean
- [reverse.name, reverse.country].filter(x => x).join(', ')
+ [reverse.name, reverse.country].filter((x) => x).join(', '),
}))
);
}
@@ -73,7 +73,7 @@ export function fetchGpsPosition(): TE.TaskEither<
promiseToTE(
() =>
ExpoLocation.getCurrentPositionAsync({
- timeout: 5000
+ timeout: 5000,
}),
// Uncomment to get other locations
// Promise.resolve({
diff --git a/App/stores/util/gql.ts b/App/stores/util/gql.ts
index 4fb5341a..8cc70cde 100644
--- a/App/stores/util/gql.ts
+++ b/App/stores/util/gql.ts
@@ -19,13 +19,13 @@ import {
gql,
MutationResult,
MutationTuple,
- QueryResult
+ QueryResult,
} from '@apollo/client';
import {
MutationCreateUserArgs,
MutationUpdateUserArgs,
QueryGetUserArgs,
- User
+ User,
} from '@shootismoke/graphql';
import Constants from 'expo-constants';
import { useEffect, useState } from 'react';
@@ -95,7 +95,7 @@ const UPDATE_USER = gql`
* Options for the `getUser` graphql query
*/
export const USER_VARIABLES = {
- expoInstallationId: Constants.installationId
+ expoInstallationId: Constants.installationId,
};
/**
@@ -118,13 +118,13 @@ export function useGetOrCreateUser(): {
QueryGetUserArgs
>(GET_USER, {
fetchPolicy: 'cache-and-network' as const,
- variables: USER_VARIABLES
+ variables: USER_VARIABLES,
});
const [createUser, createUserData] = useMutation<
{ createUser: DeepPartial },
MutationCreateUserArgs
>(CREATE_USER, {
- variables: { input: USER_VARIABLES }
+ variables: { input: USER_VARIABLES },
});
// The number of times we refetched.
@@ -134,7 +134,7 @@ export function useGetOrCreateUser(): {
useEffect(() => {
if (getUser.loading === false && getUser.data?.getUser === null) {
createUser({
- variables: { input: USER_VARIABLES }
+ variables: { input: USER_VARIABLES },
}).catch(sentryError('SelectNotifications'));
}
}, [createUser, getUser.data, getUser.loading]);
diff --git a/App/stores/util/hawk.ts b/App/stores/util/hawk.ts
index c738946f..30e72617 100644
--- a/App/stores/util/hawk.ts
+++ b/App/stores/util/hawk.ts
@@ -31,7 +31,7 @@ export interface Credentials {
export const credentials: Credentials = {
id: `${Constants.manifest.slug}-${RELEASE_CHANNEL}`,
key: Constants.manifest.extra.hawkKey,
- algorithm: 'sha256'
+ algorithm: 'sha256',
};
/**
@@ -41,18 +41,18 @@ export const credentials: Credentials = {
* @see https://www.apollographql.com/docs/react/v3.0-beta/networking/advanced-http-networking/#custom-fetching
*/
export function hawkFetch(backendUri: string) {
- return function(
+ return function (
input: RequestInfo,
init: RequestInit = {}
): Promise {
// Set Hawk authorization header on each request
const { header } = Hawk.client.header(backendUri, 'POST', {
- credentials
+ credentials,
});
return fetch(input, {
...init,
- headers: { authorization: header, ...init.headers }
+ headers: { authorization: header, ...init.headers },
});
};
}
diff --git a/App/util/amplitude.ts b/App/util/amplitude.ts
index 33b0aee4..f5c685cd 100644
--- a/App/util/amplitude.ts
+++ b/App/util/amplitude.ts
@@ -68,7 +68,7 @@ export function setupAmplitude(): Promise {
Amplitude.setUserProperties({
sisReleaseChannel: RELEASE_CHANNEL,
sisRevisionId: Constants.manifest.revisionId || 'development',
- sisVersion: Constants.manifest.version
+ sisVersion: Constants.manifest.version,
});
}
)
diff --git a/App/util/fp.ts b/App/util/fp.ts
index b238dfaf..947a4708 100644
--- a/App/util/fp.ts
+++ b/App/util/fp.ts
@@ -26,7 +26,7 @@ import {
exponentialBackoff,
limitRetries,
monoidRetryPolicy,
- RetryStatus
+ RetryStatus,
} from 'retry-ts';
import { retrying } from 'retry-ts/lib/Task';
@@ -52,7 +52,7 @@ export function sideEffect(fn: (input: A) => TE.TaskEither) {
pipe(
fn(input),
TE.fold(
- error =>
+ (error) =>
pipe(
T.fromIO(C.log(error)),
T.map(() => input)
@@ -90,12 +90,12 @@ export function retry(
return retrying(
policy,
- status =>
+ (status) =>
pipe(
status.previousDelay,
O.fold(
() => TE.left(new Error('Empty Option')),
- delay => teFn(status, delay)
+ (delay) => teFn(status, delay)
)
),
E.isLeft
diff --git a/App/util/sentry.ts b/App/util/sentry.ts
index 9c9905a4..30920394 100644
--- a/App/util/sentry.ts
+++ b/App/util/sentry.ts
@@ -30,7 +30,7 @@ const UNTRACKED_ERRORS = [
'Permission to access notifications was denied',
// No results from data providers
'does not have PM2.5 measurings right now',
- 'Cannot normalize, got 0 result'
+ 'Cannot normalize, got 0 result',
];
/**
@@ -40,10 +40,10 @@ const UNTRACKED_ERRORS = [
* @param error - The error to send
*/
export function sentryError(namespace: string) {
- return function(error: Error): void {
+ return function (error: Error): void {
if (
IS_SENTRY_SET_UP &&
- !UNTRACKED_ERRORS.some(msg => error.message.includes(msg))
+ !UNTRACKED_ERRORS.some((msg) => error.message.includes(msg))
) {
Sentry.captureException(error);
}
diff --git a/App/util/station.ts b/App/util/station.ts
index 63a077fa..240f2606 100644
--- a/App/util/station.ts
+++ b/App/util/station.ts
@@ -50,7 +50,7 @@ export function getCorrectLatLng(
return {
...station,
latitude: station.longitude,
- longitude: station.latitude
+ longitude: station.latitude,
};
}
diff --git a/App/util/theme.ts b/App/util/theme.ts
index b78a9e69..8ccb6e7e 100644
--- a/App/util/theme.ts
+++ b/App/util/theme.ts
@@ -32,7 +32,7 @@ export const spacing = {
mini: scale(10),
small: scale(15),
normal: scale(20),
- big: scale(36)
+ big: scale(36),
};
/**
@@ -44,9 +44,9 @@ export const spacing = {
const fixTextMargin = {
...Platform.select({
ios: {
- marginTop: scale(3)
- }
- })
+ marginTop: scale(3),
+ },
+ }),
};
/**
@@ -67,23 +67,23 @@ export function elevationShadowStyle(
shadowColor: 'black',
shadowOffset: {
width: 0,
- height: scale((position === 'bottom' ? 1 : -1) * elevation)
+ height: scale((position === 'bottom' ? 1 : -1) * elevation),
},
shadowOpacity: disabledOpacity,
- shadowRadius: scale(0.8 * elevation)
+ shadowRadius: scale(0.8 * elevation),
};
}
export const fullScreen = {
backgroundColor,
flexGrow: 1,
- paddingTop: Constants.statusBarHeight
+ paddingTop: Constants.statusBarHeight,
};
export const link = {
color: primaryColor,
fontFamily: gotham,
- textDecorationLine: 'underline' as 'underline'
+ textDecorationLine: 'underline' as 'underline',
};
/**
@@ -95,7 +95,7 @@ export const shitText = {
fontSize: scale(31),
letterSpacing: scale(-1),
lineHeight: scale(36),
- ...fixTextMargin
+ ...fixTextMargin,
};
/**
@@ -106,7 +106,7 @@ export const text = {
fontFamily: gotham,
fontSize: scale(11),
letterSpacing: scale(0.85),
- lineHeight: scale(15)
+ lineHeight: scale(15),
};
export const title = {
@@ -115,13 +115,13 @@ export const title = {
color: textColor,
fontFamily: gothamBlack,
fontSize: scale(12),
- ...fixTextMargin
+ ...fixTextMargin,
};
export const withLetterSpacing = {
- letterSpacing: scale(2)
+ letterSpacing: scale(2),
};
export const withPadding = {
- paddingHorizontal: spacing.normal
+ paddingHorizontal: spacing.normal,
};
diff --git a/package.json b/package.json
index b287fbdb..b3e2b89b 100644
--- a/package.json
+++ b/package.json
@@ -59,7 +59,7 @@
"truncate": "^2.1.0"
},
"devDependencies": {
- "@amaurymartiny/config": "^1.0.11",
+ "@amaurymartiny/config": "^1.1.0",
"@types/jest": "^25.1.4",
"jest": "^24.9.0",
"jest-expo": "^36.0.0",
diff --git a/yarn.lock b/yarn.lock
index 1bd40d14..0bdb1dab 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,28 +2,28 @@
# yarn lockfile v1
-"@amaurymartiny/config@^1.0.11":
- version "1.0.11"
- resolved "https://registry.yarnpkg.com/@amaurymartiny/config/-/config-1.0.11.tgz#e5628bef7a1608122a1076006c24c8e3c0da42f5"
- integrity sha512-jCLJRNIrKkA62Q69dPK8mzxgKLktXy7lgjNdyxW2Huc7d1j+Owzu0mTtX7+uIHKRqLyx9ay8Y4NjAUGUA0EGFA==
+"@amaurymartiny/config@^1.1.0":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@amaurymartiny/config/-/config-1.1.0.tgz#9b2a45a80256cbb6f66211a57a79703d75282297"
+ integrity sha512-h66KY97XNnQNKglBmhHH4jMF8WgkGNhs8qu8MjOUo/ytt4tCiuxAPeja9YzCjfdJdvRYxvCnY9AE/J6opSNElA==
dependencies:
- "@amaurymartiny/eslintrc" "^1.0.11"
+ "@amaurymartiny/eslintrc" "^1.1.0"
"@amaurymartiny/tsconfig" "^1.0.11"
-"@amaurymartiny/eslintrc@^1.0.11":
- version "1.0.11"
- resolved "https://registry.yarnpkg.com/@amaurymartiny/eslintrc/-/eslintrc-1.0.11.tgz#2cb51ffc7eed3c9d1d7d21344e7dabf13b31f504"
- integrity sha512-RRgP3E7nS189Vxwo7HDGROsqmKLDnF4PzSmyuxsFPNeaI1TZrh4zmzZfoHRVo3xUQqBYf75UBVX7LFa8UzdvyQ==
+"@amaurymartiny/eslintrc@^1.1.0":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@amaurymartiny/eslintrc/-/eslintrc-1.1.0.tgz#bbdc76632332a1c7f28ebb26cea66c341a535a33"
+ integrity sha512-BOCDbv2sBlWOCThFg7W3CNh3gN0kiFpyYp7rLVI2QZerqs6OZvs3eTAb/OjMxhV+oMd2XQKQap2v1aoO7j4dzA==
dependencies:
- "@typescript-eslint/eslint-plugin" "^2.16.0"
- "@typescript-eslint/parser" "^2.16.0"
+ "@typescript-eslint/eslint-plugin" "^2.24.0"
+ "@typescript-eslint/parser" "^2.24.0"
eslint "^6.8.0"
- eslint-config-prettier "^6.9.0"
+ eslint-config-prettier "^6.10.1"
eslint-plugin-prettier "^3.1.2"
- eslint-plugin-react "^7.18.0"
- eslint-plugin-react-hooks "^2.3.0"
- eslint-plugin-simple-import-sort "^5.0.0"
- prettier "^1.19.1"
+ eslint-plugin-react "^7.19.0"
+ eslint-plugin-react-hooks "^2.5.1"
+ eslint-plugin-simple-import-sort "^5.0.2"
+ prettier "^2.0.1"
"@amaurymartiny/tsconfig@^1.0.11":
version "1.0.11"
@@ -1272,6 +1272,14 @@
pirates "^4.0.0"
source-map-support "^0.5.9"
+"@babel/runtime-corejs3@^7.8.3":
+ version "7.9.2"
+ resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.9.2.tgz#26fe4aa77e9f1ecef9b776559bbb8e84d34284b7"
+ integrity sha512-HHxmgxbIzOfFlZ+tdeRKtaxWOMUoCG5Mu3wKeUmOxjYrwb3AAHgnmtCUbPPK11/raIWLIBK250t8E2BPO0p7jA==
+ dependencies:
+ core-js-pure "^3.0.0"
+ regenerator-runtime "^0.13.4"
+
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132"
@@ -2079,40 +2087,40 @@
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d"
integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==
-"@typescript-eslint/eslint-plugin@^2.16.0":
- version "2.17.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.17.0.tgz#880435a9f9bdd50b45fa286ba63fed723d73c837"
- integrity sha512-tg/OMOtPeXlvk0ES8mZzEZ4gd1ruSE03nsKcK+teJhxYv5CPCXK6Mb/OK6NpB4+CqGTHs4MVeoSZXNFqpT1PyQ==
+"@typescript-eslint/eslint-plugin@^2.24.0":
+ version "2.25.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.25.0.tgz#0b60917332f20dcff54d0eb9be2a9e9f4c9fbd02"
+ integrity sha512-W2YyMtjmlrOjtXc+FtTelVs9OhuR6OlYc4XKIslJ8PUJOqgYYAPRJhAqkYRQo3G4sjvG8jSodsNycEn4W2gHUw==
dependencies:
- "@typescript-eslint/experimental-utils" "2.17.0"
- eslint-utils "^1.4.3"
+ "@typescript-eslint/experimental-utils" "2.25.0"
functional-red-black-tree "^1.0.1"
regexpp "^3.0.0"
tsutils "^3.17.1"
-"@typescript-eslint/experimental-utils@2.17.0":
- version "2.17.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.17.0.tgz#12ed4a5d656e02ff47a93efc7d1ce1b8f1242351"
- integrity sha512-2bNf+mZ/3mj5/3CP56v+ldRK3vFy9jOvmCPs/Gr2DeSJh+asPZrhFniv4QmQsHWQFPJFWhFHgkGgJeRmK4m8iQ==
+"@typescript-eslint/experimental-utils@2.25.0":
+ version "2.25.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.25.0.tgz#13691c4fe368bd377b1e5b1e4ad660b220bf7714"
+ integrity sha512-0IZ4ZR5QkFYbaJk+8eJ2kYeA+1tzOE1sBjbwwtSV85oNWYUBep+EyhlZ7DLUCyhMUGuJpcCCFL0fDtYAP1zMZw==
dependencies:
"@types/json-schema" "^7.0.3"
- "@typescript-eslint/typescript-estree" "2.17.0"
+ "@typescript-eslint/typescript-estree" "2.25.0"
eslint-scope "^5.0.0"
+ eslint-utils "^2.0.0"
-"@typescript-eslint/parser@^2.16.0":
- version "2.17.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.17.0.tgz#627f79586d868edbab55f46a6b183cdc341aea1d"
- integrity sha512-k1g3gRQ4fwfJoIfgUpz78AovicSWKFANmvTfkAHP24MgJHjWfZI6ya7tsQZt1sLczvP4G9BE5G5MgADHdmJB/w==
+"@typescript-eslint/parser@^2.24.0":
+ version "2.25.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.25.0.tgz#abfb3d999084824d9a756d9b9c0f36fba03adb76"
+ integrity sha512-mccBLaBSpNVgp191CP5W+8U1crTyXsRziWliCqzj02kpxdjKMvFHGJbK33NroquH3zB/gZ8H511HEsJBa2fNEg==
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
- "@typescript-eslint/experimental-utils" "2.17.0"
- "@typescript-eslint/typescript-estree" "2.17.0"
+ "@typescript-eslint/experimental-utils" "2.25.0"
+ "@typescript-eslint/typescript-estree" "2.25.0"
eslint-visitor-keys "^1.1.0"
-"@typescript-eslint/typescript-estree@2.17.0":
- version "2.17.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.17.0.tgz#2ce1531ec0925ef8d22d7026235917c2638a82af"
- integrity sha512-g0eVRULGnEEUakxRfJO0s0Hr1LLQqsI6OrkiCLpdHtdJJek+wyd8mb00vedqAoWldeDcOcP8plqw8/jx9Gr3Lw==
+"@typescript-eslint/typescript-estree@2.25.0":
+ version "2.25.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.25.0.tgz#b790497556734b7476fa7dd3fa539955a5c79e2c"
+ integrity sha512-VUksmx5lDxSi6GfmwSK7SSoIKSw9anukWWNitQPqt58LuYrKalzsgeuignbqnB+rK/xxGlSsCy8lYnwFfB6YJg==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
@@ -3166,6 +3174,11 @@ core-js-compat@^3.6.0:
browserslist "^4.8.2"
semver "7.0.0"
+core-js-pure@^3.0.0:
+ version "3.6.4"
+ resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.4.tgz#4bf1ba866e25814f149d4e9aaa08c36173506e3a"
+ integrity sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw==
+
core-js@^1.0.0:
version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
@@ -3612,10 +3625,10 @@ escodegen@^1.9.1:
optionalDependencies:
source-map "~0.6.1"
-eslint-config-prettier@^6.9.0:
- version "6.9.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.9.0.tgz#430d24822e82f7deb1e22a435bfa3999fae4ad64"
- integrity sha512-k4E14HBtcLv0uqThaI6I/n1LEqROp8XaPu6SO9Z32u5NlGRC07Enu1Bh2KEFw4FNHbekH8yzbIU9kUGxbiGmCA==
+eslint-config-prettier@^6.10.1:
+ version "6.10.1"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a"
+ integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==
dependencies:
get-stdin "^6.0.0"
@@ -3626,15 +3639,15 @@ eslint-plugin-prettier@^3.1.2:
dependencies:
prettier-linter-helpers "^1.0.0"
-eslint-plugin-react-hooks@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.3.0.tgz#53e073961f1f5ccf8dd19558036c1fac8c29d99a"
- integrity sha512-gLKCa52G4ee7uXzdLiorca7JIQZPPXRAQDXV83J4bUEeUuc5pIEyZYAZ45Xnxe5IuupxEqHS+hUhSLIimK1EMw==
+eslint-plugin-react-hooks@^2.5.1:
+ version "2.5.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz#4ef5930592588ce171abeb26f400c7fbcbc23cd0"
+ integrity sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==
-eslint-plugin-react@^7.18.0:
- version "7.18.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.18.0.tgz#2317831284d005b30aff8afb7c4e906f13fa8e7e"
- integrity sha512-p+PGoGeV4SaZRDsXqdj9OWcOrOpZn8gXoGPcIQTzo2IDMbAKhNDnME9myZWqO3Ic4R3YmwAZ1lDjWl2R2hMUVQ==
+eslint-plugin-react@^7.19.0:
+ version "7.19.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz#6d08f9673628aa69c5559d33489e855d83551666"
+ integrity sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==
dependencies:
array-includes "^3.1.1"
doctrine "^2.1.0"
@@ -3644,12 +3657,15 @@ eslint-plugin-react@^7.18.0:
object.fromentries "^2.0.2"
object.values "^1.1.1"
prop-types "^15.7.2"
- resolve "^1.14.2"
+ resolve "^1.15.1"
+ semver "^6.3.0"
+ string.prototype.matchall "^4.0.2"
+ xregexp "^4.3.0"
-eslint-plugin-simple-import-sort@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-5.0.0.tgz#fd2abac52c0ae6050baf340c004b0b5d9aa76e8e"
- integrity sha512-Zn6OppySnbwl/UonkzmMBbiFXZwe/tI9ZlSXwQek5h1FfPv3hcDTE3kG0SC70pBsKuVE8IMwZCMl0tKwcY89rw==
+eslint-plugin-simple-import-sort@^5.0.2:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-5.0.2.tgz#43b5c4ab5affa2dd8481ef40216c71723becd2e2"
+ integrity sha512-YPEGo7DbMANQ01d2OXlREcaHRszsW8LoUQ9mIjI7gXSdwpnWKfogtzL6FiBfDf1teCBx+AdcjcfDXSKpmhTWeA==
eslint-scope@^5.0.0:
version "5.0.0"
@@ -3666,6 +3682,13 @@ eslint-utils@^1.4.3:
dependencies:
eslint-visitor-keys "^1.1.0"
+eslint-utils@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd"
+ integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==
+ dependencies:
+ eslint-visitor-keys "^1.1.0"
+
eslint-visitor-keys@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
@@ -4759,6 +4782,15 @@ inquirer@^7.0.0:
strip-ansi "^5.1.0"
through "^2.3.6"
+internal-slot@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.2.tgz#9c2e9fb3cd8e5e4256c6f45fe310067fcfa378a3"
+ integrity sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g==
+ dependencies:
+ es-abstract "^1.17.0-next.1"
+ has "^1.0.3"
+ side-channel "^1.0.2"
+
invariant@^2.2.2, invariant@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
@@ -6982,10 +7014,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
-prettier@^1.19.1:
- version "1.19.1"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
- integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
+prettier@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08"
+ integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==
pretty-format@^23.6.0:
version "23.6.0"
@@ -7380,6 +7412,11 @@ regenerator-runtime@^0.13.2:
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
+regenerator-runtime@^0.13.4:
+ version "0.13.5"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697"
+ integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==
+
regenerator-transform@^0.14.0:
version "0.14.1"
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb"
@@ -7395,6 +7432,14 @@ regex-not@^1.0.0, regex-not@^1.0.2:
extend-shallow "^3.0.2"
safe-regex "^1.1.0"
+regexp.prototype.flags@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75"
+ integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==
+ dependencies:
+ define-properties "^1.1.3"
+ es-abstract "^1.17.0-next.1"
+
regexpp@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
@@ -7557,10 +7602,10 @@ resolve@1.x, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.5.0, re
dependencies:
path-parse "^1.0.6"
-resolve@^1.14.2:
- version "1.15.0"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5"
- integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==
+resolve@^1.15.1:
+ version "1.15.1"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
+ integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==
dependencies:
path-parse "^1.0.6"
@@ -7808,6 +7853,14 @@ shellwords@^0.1.1:
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==
+side-channel@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.2.tgz#df5d1abadb4e4bf4af1cd8852bf132d2f7876947"
+ integrity sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==
+ dependencies:
+ es-abstract "^1.17.0-next.1"
+ object-inspect "^1.7.0"
+
signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
@@ -8069,6 +8122,18 @@ string-width@^4.1.0:
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.0"
+string.prototype.matchall@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz#48bb510326fb9fdeb6a33ceaa81a6ea04ef7648e"
+ integrity sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg==
+ dependencies:
+ define-properties "^1.1.3"
+ es-abstract "^1.17.0"
+ has-symbols "^1.0.1"
+ internal-slot "^1.0.2"
+ regexp.prototype.flags "^1.3.0"
+ side-channel "^1.0.2"
+
string.prototype.trimleft@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634"
@@ -8855,6 +8920,13 @@ xpipe@^1.0.5:
resolved "https://registry.yarnpkg.com/xpipe/-/xpipe-1.0.5.tgz#8dd8bf45fc3f7f55f0e054b878f43a62614dafdf"
integrity sha1-jdi/Rfw/f1Xw4FS4ePQ6YmFNr98=
+xregexp@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.3.0.tgz#7e92e73d9174a99a59743f67a4ce879a04b5ae50"
+ integrity sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==
+ dependencies:
+ "@babel/runtime-corejs3" "^7.8.3"
+
xtend@~4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"