From 53e1d5c93c7631e173639eb2815773919e7684b4 Mon Sep 17 00:00:00 2001 From: AML - A Laycock Date: Fri, 8 Mar 2024 09:24:26 +0000 Subject: [PATCH] fix(lint): remove optional chains --- app/routes/app.$assetslug.$entry._index.tsx | 2 +- app/routes/app.$assetslug.$entry.delete.tsx | 4 +--- app/routes/app.$assetslug.$entry.edit.tsx | 2 +- app/routes/app.$assetslug.$entry.link-password.tsx | 2 +- app/routes/app.$assetslug._index.tsx | 2 +- app/routes/app.$assetslug.add.tsx | 2 +- app/routes/app.asset-manager.$asset.tsx | 2 +- app/routes/app.documents.$document._index.tsx | 2 +- app/routes/app.documents.$document.edit.tsx | 2 +- app/routes/app.field-manager.$field.tsx | 2 +- app/routes/app.passwords.$password._index.tsx | 2 +- app/routes/app.passwords.$password.edit.tsx | 2 +- app/routes/app.user-manager.$user.tsx | 2 +- 13 files changed, 13 insertions(+), 15 deletions(-) diff --git a/app/routes/app.$assetslug.$entry._index.tsx b/app/routes/app.$assetslug.$entry._index.tsx index d990e67..fc06a50 100644 --- a/app/routes/app.$assetslug.$entry._index.tsx +++ b/app/routes/app.$assetslug.$entry._index.tsx @@ -66,7 +66,7 @@ export const loader = async ({request, params}: LoaderFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle(data?.entry.asset.singular!, data?.name!)}] + return [{title: pageTitle(data!.entry.asset.singular, data!.name)}] } const AssetEntry = () => { diff --git a/app/routes/app.$assetslug.$entry.delete.tsx b/app/routes/app.$assetslug.$entry.delete.tsx index f9c0f10..184c4e6 100644 --- a/app/routes/app.$assetslug.$entry.delete.tsx +++ b/app/routes/app.$assetslug.$entry.delete.tsx @@ -72,9 +72,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [ - {title: pageTitle(data?.entry.asset.singular!, data?.name!, 'Delete')} - ] + return [{title: pageTitle(data!.entry.asset.singular, data!.name, 'Delete')}] } const AssetEntryDelete = () => { diff --git a/app/routes/app.$assetslug.$entry.edit.tsx b/app/routes/app.$assetslug.$entry.edit.tsx index 96da072..2ce2249 100644 --- a/app/routes/app.$assetslug.$entry.edit.tsx +++ b/app/routes/app.$assetslug.$entry.edit.tsx @@ -95,7 +95,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle(data?.entry.asset.singular!, data?.name!, 'Edit')}] + return [{title: pageTitle(data!.entry.asset.singular, data!.name, 'Edit')}] } const Asset = () => { diff --git a/app/routes/app.$assetslug.$entry.link-password.tsx b/app/routes/app.$assetslug.$entry.link-password.tsx index 9a66b82..a58c84d 100644 --- a/app/routes/app.$assetslug.$entry.link-password.tsx +++ b/app/routes/app.$assetslug.$entry.link-password.tsx @@ -79,7 +79,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => { export const meta: MetaFunction = ({data}) => { return [ { - title: pageTitle(data?.entry.asset.singular!, 'Link a Password') + title: pageTitle(data!.entry.asset.singular, 'Link a Password') } ] } diff --git a/app/routes/app.$assetslug._index.tsx b/app/routes/app.$assetslug._index.tsx index 3f9cfd6..283adfa 100644 --- a/app/routes/app.$assetslug._index.tsx +++ b/app/routes/app.$assetslug._index.tsx @@ -26,7 +26,7 @@ export const loader = async ({request, params}: LoaderFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle(data?.asset.plural!)}] + return [{title: pageTitle(data!.asset.plural)}] } const Asset = () => { diff --git a/app/routes/app.$assetslug.add.tsx b/app/routes/app.$assetslug.add.tsx index c2ed72e..763e520 100644 --- a/app/routes/app.$assetslug.add.tsx +++ b/app/routes/app.$assetslug.add.tsx @@ -59,7 +59,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => { export const meta: MetaFunction = ({data}) => { return [ { - title: pageTitle(data?.asset.singular!, 'New') + title: pageTitle(data!.asset.singular, 'New') } ] } diff --git a/app/routes/app.asset-manager.$asset.tsx b/app/routes/app.asset-manager.$asset.tsx index dc18480..6e5598c 100644 --- a/app/routes/app.asset-manager.$asset.tsx +++ b/app/routes/app.asset-manager.$asset.tsx @@ -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' diff --git a/app/routes/app.documents.$document._index.tsx b/app/routes/app.documents.$document._index.tsx index dbbf0a4..eece86d 100644 --- a/app/routes/app.documents.$document._index.tsx +++ b/app/routes/app.documents.$document._index.tsx @@ -24,7 +24,7 @@ export const loader = async ({request, params}: LoaderFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle('Document', data?.document.title!)}] + return [{title: pageTitle('Document', data!.document.title)}] } const DocumentView = () => { diff --git a/app/routes/app.documents.$document.edit.tsx b/app/routes/app.documents.$document.edit.tsx index 361a87d..032c0d3 100644 --- a/app/routes/app.documents.$document.edit.tsx +++ b/app/routes/app.documents.$document.edit.tsx @@ -65,7 +65,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle('Document', data?.document.title!, 'Edit')}] + return [{title: pageTitle('Document', data!.document.title, 'Edit')}] } const DocumentEdit = () => { diff --git a/app/routes/app.field-manager.$field.tsx b/app/routes/app.field-manager.$field.tsx index 5eb3760..36e242d 100644 --- a/app/routes/app.field-manager.$field.tsx +++ b/app/routes/app.field-manager.$field.tsx @@ -57,7 +57,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle('Field Manager', data?.field.name!)}] + return [{title: pageTitle('Field Manager', data!.field.name)}] } const FieldManagerField = () => { diff --git a/app/routes/app.passwords.$password._index.tsx b/app/routes/app.passwords.$password._index.tsx index 910d12f..04d3c65 100644 --- a/app/routes/app.passwords.$password._index.tsx +++ b/app/routes/app.passwords.$password._index.tsx @@ -34,7 +34,7 @@ export const loader = async ({request, params}: LoaderFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle('Password', data?.password.title!)}] + return [{title: pageTitle('Password', data!.password.title)}] } const AssetManagerAsset = () => { diff --git a/app/routes/app.passwords.$password.edit.tsx b/app/routes/app.passwords.$password.edit.tsx index f9b3925..7b73c53 100644 --- a/app/routes/app.passwords.$password.edit.tsx +++ b/app/routes/app.passwords.$password.edit.tsx @@ -79,7 +79,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle('Password', data?.password.title!, 'Edit')}] + return [{title: pageTitle('Password', data!.password.title, 'Edit')}] } const PasswordEdit = () => { diff --git a/app/routes/app.user-manager.$user.tsx b/app/routes/app.user-manager.$user.tsx index 082bd60..8c077c6 100644 --- a/app/routes/app.user-manager.$user.tsx +++ b/app/routes/app.user-manager.$user.tsx @@ -60,7 +60,7 @@ export const action = async ({request, params}: ActionFunctionArgs) => { } export const meta: MetaFunction = ({data}) => { - return [{title: pageTitle('User Manager', data?.user.name!)}] + return [{title: pageTitle('User Manager', data!.user.name)}] } const UserManagerUser = () => {