Skip to content

Commit

Permalink
Bump eslint-plugin-prettier from 4.2.1 to 5.0.1 (#287)
Browse files Browse the repository at this point in the history
* Bump eslint-plugin-prettier from 4.2.1 to 5.0.1

Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 4.2.1 to 5.0.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](prettier/eslint-plugin-prettier@v4.2.1...v5.0.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix prettier errors

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kaja Kvinge Akselsen <[email protected]>
Co-authored-by: Kaja Kvinge Akselsen <[email protected]>
  • Loading branch information
3 people authored Dec 5, 2023
1 parent 59112ed commit 182aaec
Show file tree
Hide file tree
Showing 127 changed files with 902 additions and 470 deletions.
634 changes: 532 additions & 102 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
"cypress": "^13.6.0",
"eslint": "8.23.1",
"eslint-config-next": "^14.0.2",
"eslint-config-prettier": "^8.6.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-testing-library": "^5.10.2",
"husky": "^8.0.0",
"jest": "^29.5.0",
Expand All @@ -79,7 +79,7 @@
"next-router-mock": "^0.9.3",
"open": "^8.4.2",
"postcss": "^8.4.31",
"prettier": "^2.7.1",
"prettier": "^3.1.0",
"react-test-renderer": "^18.2.0",
"tailwindcss": "^3.3.2",
"typescript": "4.8.3"
Expand Down
6 changes: 3 additions & 3 deletions src/api/axios/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ORGNUMMER_HEADER = "orgnummer";
export const TEST_SESSION_ID = "testscenario-session-id";

const defaultRequestHeaders = (
options?: AxiosOptions
options?: AxiosOptions,
): Record<string, string> => {
const headers: Record<string, string> = {
"Content-Type": "application/json",
Expand Down Expand Up @@ -62,7 +62,7 @@ function handleError(error: AxiosError, requestOrigin: RequestOrigin) {
export const get = <ResponseData>(
url: string,
requestOrigin: RequestOrigin,
options?: AxiosOptions
options?: AxiosOptions,
): Promise<ResponseData> => {
return axios
.get(encodeURI(url), {
Expand All @@ -80,7 +80,7 @@ export const post = <ResponseData>(
url: string,
requestOrigin: RequestOrigin,
data?: unknown,
options?: AxiosOptions
options?: AxiosOptions,
): Promise<ResponseData> => {
return axios
.post(url, data, {
Expand Down
5 changes: 4 additions & 1 deletion src/api/axios/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export enum ErrorType {
}

export class ApiErrorException extends Error {
constructor(public readonly error: ApiError, public readonly code?: number) {
constructor(
public readonly error: ApiError,
public readonly code?: number,
) {
super(error.message);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/queries/arbeidsgiver/dinesykmeldteQueriesAG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const useDineSykmeldte = () => {
const fetchDineSykmeldte = () =>
get<Sykmeldt>(
`${apiBasePath}/dinesykmeldte/${narmestelederId}`,
"fetchDineSykmeldte"
"fetchDineSykmeldte",
);

return useQuery({
Expand Down
12 changes: 6 additions & 6 deletions src/api/queries/arbeidsgiver/oppfolgingsplanerQueriesAG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const useOppfolgingsplanerAG = () => {
const fetchOppfolgingsplanerAG = () =>
get<Oppfolgingsplan[]>(
`${apiBasePath}/${narmesteLederId}/oppfolgingsplaner`,
"fetchOppfolgingsplanerAG"
"fetchOppfolgingsplanerAG",
);

return useQuery({
Expand All @@ -43,7 +43,7 @@ export const useAktiveOppfolgingsplanerAG = () => {

if (allePlaner.isSuccess) {
const planer = allePlaner.data.filter((oppfolgingsplan) =>
erOppfolgingsplanAktiv(oppfolgingsplan)
erOppfolgingsplanAktiv(oppfolgingsplan),
);

return {
Expand Down Expand Up @@ -97,26 +97,26 @@ export const useOpprettOppfolgingsplanAG = () => {
if (kopierTidligerePlan) {
const oppfolgingsplan = finnNyesteTidligereOppfolgingsplanMedVirksomhet(
oppfolgingsplaner.data,
sykmeldt.data.orgnummer
sykmeldt.data.orgnummer,
);
if (oppfolgingsplan) {
oppfolgingsplanId = await post(
`${apiOppfolgingsplanPath}/${oppfolgingsplan.id}/kopier`,
"kopierOppfolgingsplanAG"
"kopierOppfolgingsplanAG",
);
} else {
//Om det skjedde noe rart og man ikke fikk opp den tidligere planen, så bare lag en ny.
oppfolgingsplanId = await post(
`${apiBasePath}/oppfolgingsplaner/opprett`,
"opprettOppfolgingsplanAG",
opprettOppfoelgingsplan
opprettOppfoelgingsplan,
);
}
} else {
oppfolgingsplanId = await post(
`${apiBasePath}/oppfolgingsplaner/opprett`,
"opprettOppfolgingsplanAG",
opprettOppfoelgingsplan
opprettOppfoelgingsplan,
);
}
await queryClient.invalidateQueries({
Expand Down
2 changes: 1 addition & 1 deletion src/api/queries/arbeidsgiver/tilgangQueriesAG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const useTilgangAG = () => {
const fetchTilgang = () =>
get<Tilgang>(
`${apiBasePath}/tilgang/${sykmeldtData.data?.fnr}`,
"fetchTilgangAG"
"fetchTilgangAG",
);

return useQuery<Tilgang, ApiErrorException>({
Expand Down
2 changes: 1 addition & 1 deletion src/api/queries/kontaktinfo/kontaktinfoQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const useKontaktinfo = () => {
"fetchKontaktinfo",
{
personIdent: sykmeldtData.data?.fnr,
}
},
);

return useQuery({
Expand Down
4 changes: 2 additions & 2 deletions src/api/queries/oppfolgingsplan/arbeidsoppgaveQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const useLagreArbeidsoppgave = () => {
await post(
`${apiPath}/${oppfolgingsplanId}/arbeidsoppgave/lagre`,
"lagreOppgave",
oppgave
oppgave,
);
};

Expand All @@ -43,7 +43,7 @@ export const useSlettArbeidsoppgave = () => {
const slettOppgave = async (arbeidsoppgaveId: number) => {
await post(
`${apiPath}/${oppfolgingsplanId}/arbeidsoppgave/${arbeidsoppgaveId}/slett`,
"slettOppgave"
"slettOppgave",
);
};

Expand Down
20 changes: 10 additions & 10 deletions src/api/queries/oppfolgingsplan/oppfolgingsplanQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const useKopierOppfolgingsplan = () => {
const postKopierOppfolgingsplan = async (oppfolgingsplanIdToCopy: number) => {
const oppfolgingsplanId = await post<number>(
`${apiPath}/${oppfolgingsplanIdToCopy}/kopier`,
"postKopierOppfolgingsplan"
"postKopierOppfolgingsplan",
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand All @@ -44,7 +44,7 @@ export const useNullstillGodkjenning = () => {
const nullstillGodkjenning = async (oppfolgingsplanId: number) => {
await post(
`${apiPath}/${oppfolgingsplanId}/nullstillgodkjenning`,
"useNullstillGodkjenning"
"useNullstillGodkjenning",
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand All @@ -64,7 +64,7 @@ export const useGodkjennsistOppfolgingsplan = (oppfolgingsplanId: number) => {
await post(
`${apiBasePath}/oppfolgingsplaner/${oppfolgingsplanId}/godkjennsist`,
"useGodkjennsistOppfolgingsplan",
data
data,
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand All @@ -85,7 +85,7 @@ export const useGodkjennOppfolgingsplan = (oppfolgingsplanId: number) => {
await post(
`${apiBasePath}/oppfolgingsplaner/${oppfolgingsplanId}/godkjenn`,
"useGodkjennOppfolgingsplan",
data
data,
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand Down Expand Up @@ -113,7 +113,7 @@ export const useGodkjennEgenOppfolgingsplanAG = (oppfolgingsplanId: number) => {
await post(
`${apiBasePath}/oppfolgingsplaner/${oppfolgingsplanId}/godkjennegenplan`,
"useGodkjennEgenOppfolgingsplanAG",
data
data,
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand All @@ -138,7 +138,7 @@ export const useAvvisOppfolgingsplan = () => {
const postAvvisOppfolgingsplan = async (oppfolgingsplanId: number) => {
await post(
`${apiPath}/${oppfolgingsplanId}/avvis`,
"useAvvisOppfolgingsplan"
"useAvvisOppfolgingsplan",
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand All @@ -155,7 +155,7 @@ export const useDelOppfolgingsplanMedNav = () => {
const delPlanMedNAV = async (oppfolgingsplanId: number) => {
await post(
`${apiBasePath}/${oppfolgingsplanId}/delmednav`,
"useDelOppfolgingsplanMedNav"
"useDelOppfolgingsplanMedNav",
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand All @@ -172,7 +172,7 @@ export const useDelOppfolgingsplanMedFastlege = () => {
const delPlanMedFastlege = async (oppfolgingsplanId: number) => {
await post(
`${apiBasePath}/${oppfolgingsplanId}/delmedfastlege`,
"useDelOppfolgingsplanMedFastlege"
"useDelOppfolgingsplanMedFastlege",
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand All @@ -191,7 +191,7 @@ export const useAvbrytOppfolgingsplan = () => {
const postAvbrytOppfolgingsplan = async (oppfolgingsplanId: number) => {
const newOppfolgingsplanId = await post<number>(
`${apiBasePath}/${oppfolgingsplanId}/avbryt`,
"useAvbrytOppfolgingsplan"
"useAvbrytOppfolgingsplan",
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand All @@ -204,7 +204,7 @@ export const useAvbrytOppfolgingsplan = () => {
};

export const useInnloggetFnr = (
oppfolgingsplan: Oppfolgingsplan | undefined
oppfolgingsplan: Oppfolgingsplan | undefined,
): string | null | undefined => {
const { isAudienceSykmeldt } = useAudience();

Expand Down
8 changes: 4 additions & 4 deletions src/api/queries/oppfolgingsplan/tiltakQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const useLagreTiltak = () => {
await post(
`${apiPath}/${oppfolgingsplanId}/tiltak/lagre`,
"useLagreTiltak",
tiltak
tiltak,
);
};

Expand All @@ -43,7 +43,7 @@ export const useSlettTiltakSM = () => {
const slettTiltak = async (tiltakId: number) => {
await post(
`${apiPath}/${oppfolgingsplanId}/tiltak/${tiltakId}/slett`,
"useSlettTiltakSM"
"useSlettTiltakSM",
);
};

Expand Down Expand Up @@ -79,7 +79,7 @@ export const useLagreKommentar = () => {
await post(
`${apiPath}/${oppfolgingsplanId}/tiltak/${tiltakId}/kommentar/lagre`,
"useLagreKommentar",
kommentar
kommentar,
);
};

Expand Down Expand Up @@ -114,7 +114,7 @@ export const useSlettKommentar = () => {
}: SlettKommentarProps) => {
await post(
`${apiPath}/${oppfolgingsplanId}/tiltak/${tiltakId}/kommentar/${kommentarId}/slett`,
"useSlettKommentar"
"useSlettKommentar",
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/api/queries/sykmeldt/narmesteLedereQueriesSM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const useNarmesteLedereSM = () => {
const fetchNarmesteLedere = () =>
get<NarmesteLederDTO[]>(
`${apiBasePath}/narmesteledere/${sykmeldtFnr}`,
"fetchNarmesteLedereSM"
"fetchNarmesteLedereSM",
);

return useQuery({
Expand Down
8 changes: 4 additions & 4 deletions src/api/queries/sykmeldt/oppfolgingsplanerQueriesSM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const useOppfolgingsplanerSM = () => {
const fetchOppfolgingsplaner = () =>
get<Oppfolgingsplan[]>(
`${apiBasePath}/oppfolgingsplaner`,
"fetchOppfolgingsplanerSM"
"fetchOppfolgingsplanerSM",
);

return useQuery({
Expand All @@ -40,7 +40,7 @@ export const useAktivPlanSM = (): Oppfolgingsplan | undefined => {
};

export const useGjeldendePlanSM = (
virksomhetsnummer?: string | null
virksomhetsnummer?: string | null,
): Oppfolgingsplan | null => {
const allePlaner = useOppfolgingsplanerSM();

Expand All @@ -52,7 +52,7 @@ export const useGjeldendePlanSM = (
return (
finnNyOppfolgingsplanMedVirkshomhetEtterAvbrutt(
allePlaner.data,
virksomhetsnummer
virksomhetsnummer,
) || null
);
}
Expand All @@ -78,7 +78,7 @@ export const useOpprettOppfolgingsplanSM = () => {
const oppfolgingsplanId = await post<number>(
`${apiBasePath}/oppfolgingsplaner/opprett`,
"opprettOppfolgingsplanSM",
data
data,
);
await queryClient.invalidateQueries({
queryKey: [queryKeys.OPPFOLGINGSPLANER],
Expand Down
4 changes: 2 additions & 2 deletions src/api/queries/testScenarioQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const useSetActiveTestScenario = () => {
await post(
`${router.basePath}/api/scenario/activescenario`,
"setActiveTestScenario",
mockSetup
mockSetup,
);
await queryClient.invalidateQueries();
};
Expand All @@ -26,7 +26,7 @@ export const useActiveTestScenario = () => {
const fetchActiveTestScenario = () =>
get<TestScenario>(
`${router.basePath}/api/scenario/activescenario`,
"fetchActiveTestScenario"
"fetchActiveTestScenario",
);

return useQuery({
Expand Down
2 changes: 1 addition & 1 deletion src/api/queries/varsel/ferdigstillingQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const useFerdigstillGodkjennPlanVarsel = () => {
const ferdigstillVarsel = async (oppfolgingsplanId: number) => {
await post(
`${basePath}/api/varsel/${oppfolgingsplanId}/ferdigstill`,
"useFerdigstillGodkjennPlanVarsel"
"useFerdigstillGodkjennPlanVarsel",
);
};

Expand Down
6 changes: 3 additions & 3 deletions src/auth/beskyttetSide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { validateToken } from "../server/auth/idporten/verifyIdportenToken";
import { isMockBackend } from "../server/utils/serverEnv";

export type PageHandler = (
context: GetServerSidePropsContext
context: GetServerSidePropsContext,
) => Promise<GetServerSidePropsResult<Record<string, unknown>>>;

const beskyttetSide = (handler: PageHandler) => {
return async function withBearerTokenHandler(
context: GetServerSidePropsContext
context: GetServerSidePropsContext,
): Promise<ReturnType<NonNullable<typeof handler>>> {
if (isMockBackend) {
return handler(context);
Expand Down Expand Up @@ -50,5 +50,5 @@ export const beskyttetSideUtenProps = beskyttetSide(
return {
props: {},
};
}
},
);
4 changes: 2 additions & 2 deletions src/components/arbeidsoppgaver/EditerArbeidsoppgave.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const EditerArbeidsoppgave = ({
const lagreArbeidsoppgave = useLagreArbeidsoppgave();

const arbeidsoppgaveInformasjon = (
data: OppgaveFormValues
data: OppgaveFormValues,
): Arbeidsoppgave => {
return {
...arbeidsoppgave,
Expand Down Expand Up @@ -64,7 +64,7 @@ export const EditerArbeidsoppgave = ({
arbeidsoppgavenavn: arbeidsoppgave.arbeidsoppgavenavn,
kanGjennomfores: arbeidsoppgave.gjennomfoering?.kanGjennomfoeres || "",
tilrettelegging: getTilretteleggingFormData(
arbeidsoppgave.gjennomfoering
arbeidsoppgave.gjennomfoering,
),
kanBeskrivelse: arbeidsoppgave.gjennomfoering?.kanBeskrivelse || "",
kanIkkeBeskrivelse:
Expand Down
Loading

0 comments on commit 182aaec

Please sign in to comment.