Enable no-unnecessary-type-assertion ts eslint rule

This commit is contained in:
Matthew Haughton 2024-10-30 09:41:23 +11:00
parent 6ac3432d27
commit 9f9c456433
2 changed files with 3 additions and 2 deletions

View File

@ -59,6 +59,7 @@ export default [
rules: { rules: {
'@typescript-eslint/explicit-function-return-type': 'error', '@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-expressions': 'warn', '@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unused-vars': 'error', '@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/prefer-ts-expect-error': 'error', '@typescript-eslint/prefer-ts-expect-error': 'error',

View File

@ -581,9 +581,9 @@ export abstract class DocumentManager {
const element = this.querySelector('.detailImageProgressContainer'); const element = this.querySelector('.detailImageProgressContainer');
if (value) { if (value) {
(element as HTMLElement).classList.remove('d-none'); element.classList.remove('d-none');
} else { } else {
(element as HTMLElement).classList.add('d-none'); element.classList.add('d-none');
} }
} }