From d28459d3c1a585b4e0a9f59e10283f899eca601e Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Fri, 30 Aug 2019 19:48:02 -0500 Subject: [PATCH] rm explicit return types, misc. linting --- src/FilterLists.Web.V2/src/App.tsx | 14 +++---- .../src/components/Description.tsx | 2 +- .../src/components/LicenseTag.tsx | 4 +- .../src/components/ListInfoButton.tsx | 2 +- .../src/components/SubscribeButton.tsx | 2 +- .../languageCloud/LanguageCloud.tsx | 12 ++---- .../src/components/listsTable/ListsTable.tsx | 40 ++++++++++--------- .../src/components/tagCloud/TagCloud.tsx | 2 +- src/FilterLists.Web.V2/src/index.css | 6 +-- src/FilterLists.Web.V2/src/utils/nameof.ts | 2 +- 10 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/FilterLists.Web.V2/src/App.tsx b/src/FilterLists.Web.V2/src/App.tsx index 73523b53e..c04abd8ce 100644 --- a/src/FilterLists.Web.V2/src/App.tsx +++ b/src/FilterLists.Web.V2/src/App.tsx @@ -27,18 +27,18 @@ export const App: React.FC = () => ; -const Logo = (): JSX.Element => +const Logo = () => FilterLists logo; -const NotFound = (props: RouteComponentProps): JSX.Element => +const NotFound = (props: RouteComponentProps) =>

404 Not Found: {props.location.pathname}

; -const CopyrightAuthor = (): JSX.Element => +const CopyrightAuthor = () => ©{new Date().getFullYear()}  Collin M. Barrett ; -const Community = (): JSX.Element => +const Community = () => Community ; -const GitHub = (): JSX.Element => +const GitHub = () => GitHub ; -const Api = (): JSX.Element => +const Api = () => API ; -const Donate = (): JSX.Element => +const Donate = () => diff --git a/src/FilterLists.Web.V2/src/components/Description.tsx b/src/FilterLists.Web.V2/src/components/Description.tsx index a2862dbf7..abfb70937 100644 --- a/src/FilterLists.Web.V2/src/components/Description.tsx +++ b/src/FilterLists.Web.V2/src/components/Description.tsx @@ -5,7 +5,7 @@ interface Props { descriptionSourceUrl: string; }; -export const Description = (props: Props): JSX.Element => +export const Description = (props: Props) => props.description ?
{props.description}
:

{props.description}

; \ No newline at end of file diff --git a/src/FilterLists.Web.V2/src/components/LicenseTag.tsx b/src/FilterLists.Web.V2/src/components/LicenseTag.tsx index a69cb9f2e..80a527e07 100644 --- a/src/FilterLists.Web.V2/src/components/LicenseTag.tsx +++ b/src/FilterLists.Web.V2/src/components/LicenseTag.tsx @@ -8,7 +8,7 @@ interface Props { showLabel?: boolean }; -export const LicenseTag = (props: Props): JSX.Element | null => +export const LicenseTag = (props: Props) => props.license && props.license.name ?
{props.showLabel &&

License:

} @@ -18,7 +18,7 @@ export const LicenseTag = (props: Props): JSX.Element | null =>
: null; -const TagContents = (props: Props): JSX.Element => +const TagContents = (props: Props) => props.license.descriptionUrl ?
{props.license.name} diff --git a/src/FilterLists.Web.V2/src/components/ListInfoButton.tsx b/src/FilterLists.Web.V2/src/components/ListInfoButton.tsx index 80a223d8e..d17d0a21c 100644 --- a/src/FilterLists.Web.V2/src/components/ListInfoButton.tsx +++ b/src/FilterLists.Web.V2/src/components/ListInfoButton.tsx @@ -8,7 +8,7 @@ interface Props { list: List; }; -export const ListInfoButton = (props: RouteComponentProps & Props): JSX.Element => { +export const ListInfoButton = (props: RouteComponentProps & Props) => { const listPath = `/lists/${props.list.id}`; return