Skip to content

Commit

Permalink
fix(lint): remove optional chains
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Mar 8, 2024
1 parent e20bf2b commit 53e1d5c
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/routes/app.$assetslug.$entry._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const loader = async ({request, params}: LoaderFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle(data?.entry.asset.singular!, data?.name!)}]
return [{title: pageTitle(data!.entry.asset.singular, data!.name)}]
}

const AssetEntry = () => {
Expand Down
4 changes: 1 addition & 3 deletions app/routes/app.$assetslug.$entry.delete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [
{title: pageTitle(data?.entry.asset.singular!, data?.name!, 'Delete')}
]
return [{title: pageTitle(data!.entry.asset.singular, data!.name, 'Delete')}]
}

const AssetEntryDelete = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.$assetslug.$entry.edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle(data?.entry.asset.singular!, data?.name!, 'Edit')}]
return [{title: pageTitle(data!.entry.asset.singular, data!.name, 'Edit')}]
}

const Asset = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.$assetslug.$entry.link-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => {
export const meta: MetaFunction<typeof loader> = ({data}) => {
return [
{
title: pageTitle(data?.entry.asset.singular!, 'Link a Password')
title: pageTitle(data!.entry.asset.singular, 'Link a Password')
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.$assetslug._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const loader = async ({request, params}: LoaderFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle(data?.asset.plural!)}]
return [{title: pageTitle(data!.asset.plural)}]
}

const Asset = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.$assetslug.add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => {
export const meta: MetaFunction<typeof loader> = ({data}) => {
return [
{
title: pageTitle(data?.asset.singular!, 'New')
title: pageTitle(data!.asset.singular, 'New')
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.asset-manager.$asset.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {type LoaderFunctionArgs, type MetaFunction, json} from '@remix-run/node'
import {type LoaderFunctionArgs, json} from '@remix-run/node'
import {Outlet, useLoaderData} from '@remix-run/react'

import {ensureUser} from '~/lib/utils/ensure-user'
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.documents.$document._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const loader = async ({request, params}: LoaderFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle('Document', data?.document.title!)}]
return [{title: pageTitle('Document', data!.document.title)}]
}

const DocumentView = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.documents.$document.edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle('Document', data?.document.title!, 'Edit')}]
return [{title: pageTitle('Document', data!.document.title, 'Edit')}]
}

const DocumentEdit = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.field-manager.$field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle('Field Manager', data?.field.name!)}]
return [{title: pageTitle('Field Manager', data!.field.name)}]
}

const FieldManagerField = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.passwords.$password._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const loader = async ({request, params}: LoaderFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle('Password', data?.password.title!)}]
return [{title: pageTitle('Password', data!.password.title)}]
}

const AssetManagerAsset = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.passwords.$password.edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle('Password', data?.password.title!, 'Edit')}]
return [{title: pageTitle('Password', data!.password.title, 'Edit')}]
}

const PasswordEdit = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.user-manager.$user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => {
}

export const meta: MetaFunction<typeof loader> = ({data}) => {
return [{title: pageTitle('User Manager', data?.user.name!)}]
return [{title: pageTitle('User Manager', data!.user.name)}]
}

const UserManagerUser = () => {
Expand Down

0 comments on commit 53e1d5c

Please sign in to comment.