Skip to content

Commit

Permalink
Enable no-unnecessary-type-assertion ts eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Nov 2, 2024
1 parent 6ac3432 commit 9f9c456
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default [
rules: {
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/prefer-ts-expect-error': 'error',
Expand Down
4 changes: 2 additions & 2 deletions src/components/documentManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,9 @@ export abstract class DocumentManager {
const element = this.querySelector('.detailImageProgressContainer');

if (value) {
(element as HTMLElement).classList.remove('d-none');
element.classList.remove('d-none');
} else {
(element as HTMLElement).classList.add('d-none');
element.classList.add('d-none');
}
}

Expand Down

0 comments on commit 9f9c456

Please sign in to comment.