Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cb2-10920): Angular 16 to 17 #1408

Merged
merged 15 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat(cb2-10920): update eslint config
  • Loading branch information
pbardy2000 committed Feb 27, 2024
commit 4c982b7f8ef279fb00af199cd9ec5d1f0743ef1c
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"no-void": ["error", { "allowAsStatement": true }]
"no-void": ["error", { "allowAsStatement": true }],
"@typescript-eslint/no-unsafe-enum-comparison": "off"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
import { Component, OnInit } from '@angular/core';
import { FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export class TechRecordSummaryComponent implements OnInit, OnDestroy {
private normaliseAxles(record: V3TechRecordModel): V3TechRecordModel {
const type = record.techRecord_vehicleType;
const category = record.techRecord_euVehicleCategory;
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison

if (type === VehicleTypes.HGV || (type === VehicleTypes.TRL && category !== 'o1' && category !== 'o2')) {
const [axles, axleSpacing] = this.axlesService.normaliseAxles(
record.techRecord_axles ?? [],
Expand Down
1 change: 0 additions & 1 deletion src/app/forms/custom-sections/body/body.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ export class BodyComponent implements OnInit, OnChanges, OnDestroy {
}

updateHgvVehicleBodyType(record: TechRecordVehicleType<'hgv'>) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (record.techRecord_vehicleConfiguration === 'articulated') {
this.store.dispatch(updateEditingTechRecord({
vehicleTechRecord: {
Expand Down
1 change: 0 additions & 1 deletion src/app/forms/services/dynamic-form.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ export class CustomFormArray extends FormArray implements CustomArray, BaseForm
},
): void {
if (value) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (value.length !== this.controls.length && this.meta.children && this.meta.children[0].type === 'group') {
if (value.length > this.controls.length) {
super.push(this.dynamicFormService.createForm(this.meta.children[0], value));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
import { HttpErrorResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { AbstractControl, AsyncValidatorFn, ValidationErrors } from '@angular/forms';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export class RefDataDecodePipe implements PipeTransform, OnDestroy {
return of(value);
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (resourceType === SpecialRefData.ReasonsForAbandoning) {
this.store
.select(getSingleVehicleType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,11 @@ function handleClearADRDetails(state: TechnicalRecordServiceState) {

// If tank details 'statement' selected, null UN numbers, product list referene no., product list
const { techRecord_adrDetails_tank_tankDetails_tankStatement_select: select } = sanitisedEditingTechRecord;
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (select === ADRTankDetailsTankStatementSelect.STATEMENT) {
sanitisedEditingTechRecord = { ...sanitisedEditingTechRecord, ...nulledTankStatementProductList };
}

// If tank details 'product list' selected, null statement reference no.
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (select === ADRTankDetailsTankStatementSelect.PRODUCT_LIST) {
sanitisedEditingTechRecord = { ...sanitisedEditingTechRecord, ...nulledTankStatementStatement };
}
Expand Down
1 change: 0 additions & 1 deletion src/app/store/user/user-service.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ export const userServiceReducer = createReducer(
);

function getRoles(rolesArray: string[]): string[] {
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
return environment.RemoveAADFullAccessRole ? rolesArray.filter((role) => role !== Roles.Admin) : rolesArray;
}
Loading