Skip to content

Commit

Permalink
chore: typescript-eslint v7
Browse files Browse the repository at this point in the history
  • Loading branch information
69pmb committed Feb 24, 2024
1 parent 7b4a826 commit ac647fe
Show file tree
Hide file tree
Showing 12 changed files with 180 additions and 78 deletions.
14 changes: 11 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
"plugin:import/recommended",
"plugin:import/typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended"
"plugin:@angular-eslint/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked"
],
"settings": {
"import/resolver": {
Expand All @@ -37,8 +38,12 @@
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true,
"tsconfigRootDir": "."
},
"plugins": [
"eslint-plugin-import",
"import",
"eslint-plugin-prefer-arrow",
"@angular-eslint",
"@typescript-eslint"
Expand Down Expand Up @@ -102,6 +107,9 @@
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@angular-eslint/prefer-standalone-component": ["error"],
"@angular-eslint/sort-lifecycle-methods": ["error"],
"@angular-eslint/component-max-inline-declarations": ["error"],
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"engines": {
"pnpm": ">=8",
"node": ">=18.12 <20.0.0"
"node": ">=18.18 <20.0.0"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -69,8 +69,8 @@
"@types/luxon": "~3.4.2",
"@types/node": "~16.18.83",
"@types/xml2js": "^0.4.14",
"@typescript-eslint/eslint-plugin": "~5.62.0",
"@typescript-eslint/parser": "~5.62.0",
"@typescript-eslint/eslint-plugin": "~7.0.2",
"@typescript-eslint/parser": "~7.0.2",
"eslint": "^8.57.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-node": "11.1.0",
Expand Down
149 changes: 121 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/list-composition/list-composition.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class ListCompositionComponent
.pipe(
skipWhile(done => done !== undefined && !done),
switchMap(() => this.dexieService.compositionTable.getAll()),
catchError(err =>
catchError((err: unknown) =>
this.utilsService.handleError(
err,
'Error when reading compositions table'
Expand Down
24 changes: 11 additions & 13 deletions src/app/list-fichier/list-fichier.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
FormControl,
FormsModule,
ReactiveFormsModule,
NonNullableFormBuilder,
} from '@angular/forms';
import {yearsValidator} from '@utils/year.validator';
import {NavigationService} from '@services/navigation.service';
Expand Down Expand Up @@ -131,18 +132,14 @@ export class ListFichierComponent
end: FormControl<number | undefined>;
}>(
{
author: new FormControl(),
name: new FormControl(),
type: new FormControl<string>('', {
nonNullable: true,
}),
deleted: new FormControl(),
category: new FormControl<string[]>([], {
nonNullable: true,
}),
top: new FormControl(),
begin: new FormControl(),
end: new FormControl(),
author: this.fb.control(''),
name: this.fb.control(''),
type: this.fb.control(''),
deleted: this.fb.control(false),
category: this.fb.control([]),
top: this.fb.control(false),
begin: this.fb.control(undefined),
end: this.fb.control(undefined),
},
{validators: yearsValidator}
);
Expand All @@ -151,7 +148,8 @@ export class ListFichierComponent
private myFichiersService: DataService<Fichier>,
private dexieService: DexieService,
protected serviceUtils: UtilsService,
private navigationService: NavigationService
private navigationService: NavigationService,
private fb: NonNullableFormBuilder
) {
super(serviceUtils);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/row-action/row-action.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class RowActionDirective implements AfterViewInit {
private readonly threshold = 900;

constructor(
private elementRef: ElementRef,
private elementRef: ElementRef<HTMLElement>,
private dialog: MatDialog
) {}

Expand Down
Loading

0 comments on commit ac647fe

Please sign in to comment.