Skip to content

Commit

Permalink
Merge pull request #657 from 3flex/no-unnecessary-type-assertion
Browse files Browse the repository at this point in the history
Enable no-unnecessary-type-assertion ts eslint rule
  • Loading branch information
nielsvanvelzen authored Nov 3, 2024
2 parents 6ac3432 + 9f9c456 commit 34937c9
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 34937c9

Please sign in to comment.