Removed lints
This commit is contained in:
parent
8e931c314b
commit
f44e6cb932
|
@ -6,6 +6,5 @@
|
|||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"bracketSpacing": true,
|
||||
"jsxBracketSameLine": false,
|
||||
"arrowParens": "avoid"
|
||||
"jsxBracketSameLine": false
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ interface AbsenceFormValues {
|
|||
const AbsenceSchema = Yup.object().shape({
|
||||
socialSecurityNumber: Yup.string()
|
||||
.required('Personnummer saknas')
|
||||
.test('is-valid', 'Personnumret är ogiltigt', value =>
|
||||
.test('is-valid', 'Personnumret är ogiltigt', (value) =>
|
||||
value ? Personnummer.valid(value) : true
|
||||
),
|
||||
isFullDay: Yup.bool().required(),
|
||||
|
@ -93,7 +93,7 @@ const Absence = () => {
|
|||
enableReinitialize
|
||||
validationSchema={AbsenceSchema}
|
||||
initialValues={initialValues}
|
||||
onSubmit={async values => {
|
||||
onSubmit={async (values) => {
|
||||
const ssn = Personnummer.parse(values.socialSecurityNumber).format()
|
||||
|
||||
if (values.isFullDay) {
|
||||
|
@ -147,7 +147,7 @@ const Absence = () => {
|
|||
<View style={styles.field}>
|
||||
<CheckBox
|
||||
checked={values.isFullDay}
|
||||
onChange={checked => setFieldValue('isFullDay', checked)}
|
||||
onChange={(checked) => setFieldValue('isFullDay', checked)}
|
||||
>
|
||||
Heldag
|
||||
</CheckBox>
|
||||
|
@ -175,7 +175,7 @@ const Absence = () => {
|
|||
minimumDate={minumumDate.toDate()}
|
||||
minuteInterval={10}
|
||||
mode="time"
|
||||
onConfirm={date => {
|
||||
onConfirm={(date) => {
|
||||
setFieldValue('startTime', date)
|
||||
setFieldValue('displayStartTimePicker', false)
|
||||
}}
|
||||
|
@ -206,7 +206,7 @@ const Absence = () => {
|
|||
minimumDate={minumumDate.toDate()}
|
||||
minuteInterval={10}
|
||||
mode="time"
|
||||
onConfirm={date => {
|
||||
onConfirm={(date) => {
|
||||
setFieldValue('endTime', date)
|
||||
setFieldValue('displayEndTimePicker', false)
|
||||
}}
|
||||
|
|
|
@ -85,22 +85,22 @@ const BottomTabBar = ({
|
|||
}: BottomTabBarProps<BottomTabBarOptions>) => (
|
||||
<BottomNavigation
|
||||
selectedIndex={state.index}
|
||||
onSelect={index => navigation.navigate(state.routeNames[index])}
|
||||
onSelect={(index) => navigation.navigate(state.routeNames[index])}
|
||||
>
|
||||
<BottomNavigationTab
|
||||
title={props => <TabTitle {...props}>Nyheter</TabTitle>}
|
||||
title={(props) => <TabTitle {...props}>Nyheter</TabTitle>}
|
||||
icon={NewsIcon}
|
||||
/>
|
||||
<BottomNavigationTab
|
||||
title={props => <TabTitle {...props}>Aviseringar</TabTitle>}
|
||||
title={(props) => <TabTitle {...props}>Aviseringar</TabTitle>}
|
||||
icon={NotificationsIcon}
|
||||
/>
|
||||
<BottomNavigationTab
|
||||
title={props => <TabTitle {...props}>Kalender</TabTitle>}
|
||||
title={(props) => <TabTitle {...props}>Kalender</TabTitle>}
|
||||
icon={CalendarOutlineIcon}
|
||||
/>
|
||||
<BottomNavigationTab
|
||||
title={props => <TabTitle {...props}>Klassen</TabTitle>}
|
||||
title={(props) => <TabTitle {...props}>Klassen</TabTitle>}
|
||||
icon={ClassIcon}
|
||||
/>
|
||||
</BottomNavigation>
|
||||
|
@ -109,7 +109,7 @@ const BottomTabBar = ({
|
|||
const TabNavigator = ({ initialRouteName = 'Nyheter' }) => (
|
||||
<Navigator
|
||||
initialRouteName={initialRouteName}
|
||||
tabBar={props => <BottomTabBar {...props} />}
|
||||
tabBar={(props) => <BottomTabBar {...props} />}
|
||||
>
|
||||
<Screen name="Nyheter" component={NewsScreen} />
|
||||
<Screen name="Notifieringar" component={NotificationsScreen} />
|
||||
|
|
|
@ -49,14 +49,14 @@ export const ChildListItem = ({ child, color }: ChildListItemProps) => {
|
|||
DateTime.local().plus({ days: 7 }).toISO()
|
||||
)
|
||||
|
||||
const notificationsThisWeek = notifications.filter(n =>
|
||||
const notificationsThisWeek = notifications.filter((n) =>
|
||||
moment(n.dateCreated).isSame('week')
|
||||
)
|
||||
|
||||
const scheduleAndCalendarThisWeek = [
|
||||
...(calendar ?? []),
|
||||
...(schedule ?? []),
|
||||
].filter(a => moment(a.startDate).isSame('week'))
|
||||
].filter((a) => moment(a.startDate).isSame('week'))
|
||||
|
||||
const getClassName = () => {
|
||||
// hack: we can find the class name (ex. 8C) from the classmates. let's pick the first one and select theirs class
|
||||
|
@ -74,7 +74,7 @@ export const ChildListItem = ({ child, color }: ChildListItemProps) => {
|
|||
return child.status
|
||||
? child.status
|
||||
.split(';')
|
||||
.map(status => {
|
||||
.map((status) => {
|
||||
const statusAsAbbreviation = status as keyof typeof abbrevations
|
||||
|
||||
return abbrevations[statusAsAbbreviation] || status
|
||||
|
@ -155,7 +155,7 @@ export const ChildListItem = ({ child, color }: ChildListItemProps) => {
|
|||
style={styles.card}
|
||||
appearance="filled"
|
||||
status={color}
|
||||
header={props => (
|
||||
header={(props) => (
|
||||
<View {...props} style={styles.cardHeader}>
|
||||
<View style={styles.cardAvatar}>
|
||||
<Avatar source={require('../assets/avatar.png')} shape="square" />
|
||||
|
|
|
@ -52,7 +52,7 @@ export const ContactMenu = ({
|
|||
backdropStyle={styles.backdrop}
|
||||
onBackdropPress={handleBackdropPress}
|
||||
>
|
||||
{contact.guardians.map(guardian => {
|
||||
{contact.guardians.map((guardian) => {
|
||||
const { address, email, mobile } = guardian
|
||||
|
||||
return (
|
||||
|
|
|
@ -150,15 +150,15 @@ export const Login = () => {
|
|||
value={socialSecurityNumber}
|
||||
style={styles.pnrInput}
|
||||
accessoryLeft={PersonIcon}
|
||||
accessoryRight={props => (
|
||||
accessoryRight={(props) => (
|
||||
<TouchableWithoutFeedback onPress={() => handleInput('')}>
|
||||
<CloseOutlineIcon {...props} />
|
||||
</TouchableWithoutFeedback>
|
||||
)}
|
||||
keyboardType="numeric"
|
||||
onSubmitEditing={event => startLogin(event.nativeEvent.text)}
|
||||
onSubmitEditing={(event) => startLogin(event.nativeEvent.text)}
|
||||
caption={error || ''}
|
||||
onChangeText={text => handleInput(text)}
|
||||
onChangeText={(text) => handleInput(text)}
|
||||
placeholder="Ditt personnr"
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -10,7 +10,7 @@ interface MarkdownProps {
|
|||
}
|
||||
|
||||
const rules: RenderRules = {
|
||||
image: node => {
|
||||
image: (node) => {
|
||||
const { src } = node.attributes
|
||||
const url = src.startsWith('/')
|
||||
? `https://elevstockholm.sharepoint.com${src}`
|
||||
|
|
|
@ -15,7 +15,7 @@ export const NewsList = () => {
|
|||
style={styles.container}
|
||||
contentContainerStyle={styles.contentContainer}
|
||||
data={data}
|
||||
renderItem={info => (
|
||||
renderItem={(info) => (
|
||||
<NewsListItem key={info.item.id} item={info.item} />
|
||||
)}
|
||||
/>
|
||||
|
|
|
@ -23,7 +23,7 @@ export const Notification = ({ item }: NotificationProps) => {
|
|||
<Card
|
||||
style={styles.card}
|
||||
onPress={open}
|
||||
header={headerProps => (
|
||||
header={(headerProps) => (
|
||||
<View {...headerProps}>
|
||||
<Text style={styles.title}>{item.sender}</Text>
|
||||
<Text style={styles.subtitle}>
|
||||
|
|
|
@ -14,7 +14,9 @@ export const NotificationsList = () => {
|
|||
style={styles.container}
|
||||
contentContainerStyle={styles.contentContainer}
|
||||
data={data}
|
||||
renderItem={info => <Notification key={info.item.id} item={info.item} />}
|
||||
renderItem={(info) => (
|
||||
<Notification key={info.item.id} item={info.item} />
|
||||
)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue