From f5bbb656d1afe102f8924d35303b19f559855cd6 Mon Sep 17 00:00:00 2001 From: Saul Date: Mon, 13 Nov 2023 09:20:28 +0100 Subject: [PATCH] style: fix format issues --- projects/ngrx-rtk-query/src/lib/module.ts | 4 ++-- projects/ngrx-rtk-query/test/build-hooks.spec.ts | 4 ++-- .../pagination/character-card/character-card.component.ts | 4 ++-- src/app/features/skip/pokemon/pokemon.component.ts | 1 + .../features/skip/skip-container/skip-container.component.ts | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/projects/ngrx-rtk-query/src/lib/module.ts b/projects/ngrx-rtk-query/src/lib/module.ts index 074c81d..6361dc0 100644 --- a/projects/ngrx-rtk-query/src/lib/module.ts +++ b/projects/ngrx-rtk-query/src/lib/module.ts @@ -38,8 +38,8 @@ declare module '@reduxjs/toolkit/query' { [K in keyof Definitions]: Definitions[K] extends QueryDefinition ? QueryHooks : Definitions[K] extends MutationDefinition - ? MutationHooks - : never; + ? MutationHooks + : never; }; /** * A hook that accepts a string endpoint name, and provides a callback that when called, diff --git a/projects/ngrx-rtk-query/test/build-hooks.spec.ts b/projects/ngrx-rtk-query/test/build-hooks.spec.ts index eac9b73..7e06f14 100644 --- a/projects/ngrx-rtk-query/test/build-hooks.spec.ts +++ b/projects/ngrx-rtk-query/test/build-hooks.spec.ts @@ -627,14 +627,14 @@ describe.skip('hooks tests', () => { expect(Object.keys(getState().api.mutations)).toHaveLength(0); - userEvent.click(screen.getByRole('button', { name: 'trigger' })); + await userEvent.click(screen.getByRole('button', { name: 'trigger' })); await screen.findByText(/isSuccess/i); expect(screen.getByText('Yay')).toBeInTheDocument(); expect(Object.keys(getState().api.mutations)).toHaveLength(1); - userEvent.click(screen.getByRole('button', { name: 'reset' })); + await userEvent.click(screen.getByRole('button', { name: 'reset' })); await screen.findByText(/isUninitialized/i); expect(screen.queryByText('Yay')).not.toBeInTheDocument(); diff --git a/src/app/features/pagination/character-card/character-card.component.ts b/src/app/features/pagination/character-card/character-card.component.ts index 06680d9..06e6b18 100644 --- a/src/app/features/pagination/character-card/character-card.component.ts +++ b/src/app/features/pagination/character-card/character-card.component.ts @@ -23,8 +23,8 @@ import { useLazyGetEpisodeQuery } from '../services'; character.status.toLowerCase() === statusTypes.dead ? 'bg-red-400' : character.status.toLowerCase() === statusTypes.alive - ? 'bg-green-400' - : 'bg-gray-400' + ? 'bg-green-400' + : 'bg-gray-400' " >
{{ character.status }}
diff --git a/src/app/features/skip/pokemon/pokemon.component.ts b/src/app/features/skip/pokemon/pokemon.component.ts index a792f42..c27e4f9 100644 --- a/src/app/features/skip/pokemon/pokemon.component.ts +++ b/src/app/features/skip/pokemon/pokemon.component.ts @@ -19,6 +19,7 @@ export class PokemonComponent implements OnInit, OnDestroy { query = pokemonApi.endpoints.getPokemonByName.useQuery(this.#name, this.#options); + // eslint-disable-next-line @typescript-eslint/no-explicit-any intervalId: any; ngOnInit(): void { diff --git a/src/app/features/skip/skip-container/skip-container.component.ts b/src/app/features/skip/skip-container/skip-container.component.ts index 080b373..2fdb81b 100644 --- a/src/app/features/skip/skip-container/skip-container.component.ts +++ b/src/app/features/skip/skip-container/skip-container.component.ts @@ -29,6 +29,7 @@ export class SkipContainerComponent implements OnDestroy { name = signal(nanoid()); running = signal(false); + // eslint-disable-next-line @typescript-eslint/no-explicit-any queryIntervalId: any; getSubscriptionsLength(subscriptions: object): number {