Skip to content

Commit

Permalink
chore: tanstack + eslint upgrade AB#32202 (#6372)
Browse files Browse the repository at this point in the history
* chore: tanstack + eslint upgrade AB#32202

* fix: replace deprecated method AB#32202
  • Loading branch information
arsforza authored Jan 9, 2025
1 parent d633899 commit 1492a64
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 108 deletions.
188 changes: 103 additions & 85 deletions interfaces/Portalicious/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions interfaces/Portalicious/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@azure/msal-browser": "3.28.0",
"@microsoft/applicationinsights-web": "^3.3.4",
"@primeng/themes": "^19.0.2",
"@tanstack/angular-query-experimental": "^5.62.8",
"@tanstack/angular-query-experimental": "^5.62.16",
"angular-mentions": "^1.5.0",
"chart.js": "^4.4.7",
"chartjs-plugin-datalabels": "^2.2.0",
Expand All @@ -62,15 +62,15 @@
"@microsoft/applicationinsights-debugplugin-js": "^3.3.4",
"@prettier/plugin-xml": "^3.4.1",
"@savvywombat/tailwindcss-grid-areas": "^4.0.0",
"@tanstack/eslint-plugin-query": "^5.62.1",
"@tanstack/eslint-plugin-query": "^5.62.16",
"@types/jasmine": "~5.1.5",
"@types/lodash": "^4.17.13",
"@types/lodash": "^4.17.14",
"angular-eslint": "^19.0.2",
"autoprefixer": "^10.4.20",
"dotenv": "^16.4.7",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-no-relative-import-paths": "^1.5.5",
"eslint-plugin-no-relative-import-paths": "^1.6.1",
"eslint-plugin-perfectionist": "^3.9.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-regexp": "^2.7.0",
Expand All @@ -89,7 +89,7 @@
"shx": "^0.3.4",
"tailwindcss": "^3.4.17",
"typescript": "~5.6.0",
"typescript-eslint": "^8.19.0"
"typescript-eslint": "^8.19.1"
},
"overrides": {
"ngx-filesize": {
Expand Down
4 changes: 2 additions & 2 deletions interfaces/Portalicious/src/app/domains/domain-api.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { inject, isSignal, Signal } from '@angular/core';

import {
injectQueryClient,
QueryClient,
queryOptions,
UndefinedInitialDataOptions,
} from '@tanstack/angular-query-experimental';
Expand All @@ -18,7 +18,7 @@ import {
export abstract class DomainApiService {
protected httpWrapperService = inject(HttpWrapperService);
protected paginateQueryService = inject(PaginateQueryService);
protected queryClient = injectQueryClient();
protected queryClient = inject(QueryClient);

protected pathToQueryKey = (
path: (number | Signal<number | string | undefined> | string)[],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { inject, signal } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivateFn, Router } from '@angular/router';

import { injectQueryClient } from '@tanstack/angular-query-experimental';
import { QueryClient } from '@tanstack/angular-query-experimental';

import { PaymentApiService } from '~/domains/payment/payment.api.service';
import { ProjectApiService } from '~/domains/project/project.api.service';
Expand All @@ -17,7 +17,7 @@ export const foundResourceGuard: (
return async function projectPermissionsCanActivateFn(
route: ActivatedRouteSnapshot,
) {
const queryClient = injectQueryClient();
const queryClient = inject(QueryClient);
const router = inject(Router);

const registrationApiService = inject(RegistrationApiService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {
injectMutation,
injectQuery,
injectQueryClient,
QueryClient,
} from '@tanstack/angular-query-experimental';
import { ButtonModule } from 'primeng/button';

Expand Down Expand Up @@ -38,7 +38,7 @@ export class ImportReconciliationDataComponent {
projectId = input.required<string>();
paymentId = input.required<string>();

private queryClient = injectQueryClient();
private queryClient = inject(QueryClient);
private authService = inject(AuthService);
private downloadService = inject(DownloadService);
private metricApiService = inject(MetricApiService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FormsModule } from '@angular/forms';
import {
injectMutation,
injectQuery,
injectQueryClient,
QueryClient,
} from '@tanstack/angular-query-experimental';
import { AccordionModule } from 'primeng/accordion';
import { ButtonModule } from 'primeng/button';
Expand Down Expand Up @@ -55,7 +55,7 @@ export class ProjectRegistrationDebitCardsPageComponent {

private readonly registrationApiService = inject(RegistrationApiService);
private readonly toastService = inject(ToastService);
private readonly queryClient = injectQueryClient();
private readonly queryClient = inject(QueryClient);

registration = injectQuery(
this.registrationApiService.getRegistrationById(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

import {
injectMutation,
injectQueryClient,
QueryClient,
} from '@tanstack/angular-query-experimental';
import { ButtonModule } from 'primeng/button';

Expand All @@ -31,7 +31,7 @@ import { ToastService } from '~/services/toast.service';
export class ImportRegistrationsComponent {
projectId = input.required<string>();

private queryClient = injectQueryClient();
private queryClient = inject(QueryClient);
private downloadService = inject(DownloadService);
private registrationApiService = inject(RegistrationApiService);
private toastService = inject(ToastService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
PopupRequest,
RedirectRequest,
} from '@azure/msal-browser';
import { injectQueryClient } from '@tanstack/angular-query-experimental';
import { QueryClient } from '@tanstack/angular-query-experimental';

import { AppRoutes } from '~/app.routes';
import { UserApiService } from '~/domains/user/user.api.service';
Expand All @@ -33,7 +33,7 @@ export class MsalAuthStrategy implements IAuthStrategy {
private readonly msalService = inject(MsalService);
private readonly router = inject(Router);
private readonly userApiService = inject(UserApiService);
private queryClient = injectQueryClient();
private queryClient = inject(QueryClient);

constructor() {
this.msalService.initialize();
Expand Down
4 changes: 2 additions & 2 deletions interfaces/Portalicious/src/app/services/export.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from '@angular/common/http';
import { inject, Injectable, Signal } from '@angular/core';

import { injectQueryClient } from '@tanstack/angular-query-experimental';
import { QueryClient } from '@tanstack/angular-query-experimental';
import * as XLSX from 'xlsx';

import { ExportType } from '@121-service/src/metrics/enum/export-type.enum';
Expand All @@ -25,7 +25,7 @@ import { addDaysToDate, dateToIsoString } from '~/utils/date';
providedIn: 'root',
})
export class ExportService {
private queryClient = injectQueryClient();
private queryClient = inject(QueryClient);

private paginateQueryService = inject(PaginateQueryService);
private eventApiService = inject(EventApiService);
Expand Down
4 changes: 2 additions & 2 deletions interfaces/Portalicious/src/app/services/messaging.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { inject, Injectable, Signal } from '@angular/core';

import { injectQueryClient } from '@tanstack/angular-query-experimental';
import { QueryClient } from '@tanstack/angular-query-experimental';

import { RegistrationStatusEnum } from '@121-service/src/registration/enum/registration-status.enum';
import { LocalizedString } from '@121-service/src/shared/types/localized-string.type';
Expand All @@ -27,7 +27,7 @@ export type MessageInputData =
providedIn: 'root',
})
export class MessagingService {
private queryClient = injectQueryClient();
private queryClient = inject(QueryClient);

private notificationApiService = inject(NotificationApiService);
private projectApiService = inject(ProjectApiService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@angular/forms';

import {
injectQueryClient,
QueryClient,
queryOptions,
} from '@tanstack/angular-query-experimental';

Expand Down Expand Up @@ -84,7 +84,7 @@ export interface NormalizedRegistrationAttribute {
providedIn: 'root',
})
export class RegistrationAttributeService {
private readonly queryClient = injectQueryClient();
private readonly queryClient = inject(QueryClient);

private readonly authService = inject(AuthService);
private readonly projectApiService = inject(ProjectApiService);
Expand Down

0 comments on commit 1492a64

Please sign in to comment.