Skip to content

Commit

Permalink
fixup! Use instanceOfNodeError
Browse files Browse the repository at this point in the history
  • Loading branch information
tamuratak committed Oct 23, 2024
1 parent 6246a03 commit 073a380
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import tseslint from 'typescript-eslint';

const commonRules = {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/consistent-type-assertions": ["error", {
assertionStyle: "as",
objectLiteralTypeAssertions: "never",
Expand Down
2 changes: 1 addition & 1 deletion src/components/snippetview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class SnippetViewProvider implements vscode.WebviewViewProvider {
const editor = this.lastActiveTextEditor
if (editor) {
editor.insertSnippet(new vscode.SnippetString(message.snippet.replace(/\\\n/g, '\\n'))).then(
() => {},
() => undefined,
err => {
void vscode.window.showWarningMessage(`Unable to insert symbol, ${err}`)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/viewerlib/pdfviewerhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class PdfViewerHookProvider implements vscode.CustomReadonlyEditorProvide
openCustomDocument(uri: vscode.Uri) {
return {
uri,
dispose: () => {}
dispose: () => undefined
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/utils/externalpromise.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function promiseTriplet<T>() {
let resolve: ((value: T | PromiseLike<T>) => void) = () => {}
let reject: ((reason?: any) => void) = () => {}
let resolve: ((value: T | PromiseLike<T>) => void) = () => undefined
let reject: ((reason?: any) => void) = () => undefined
const promise = new Promise<T>((r, rej) => {
resolve = r
reject = rej
Expand Down
3 changes: 1 addition & 2 deletions test/unittests/components/locatorlib/synctex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { inspect } from 'node:util'

suite('unit test suite', () => {

suiteSetup(() => {
})
suiteSetup(() => undefined)

runUnitTestWithFixture('fixture001', 'test synctex', () => {
const fixtureDir = getFixtureDir()
Expand Down
12 changes: 6 additions & 6 deletions test/utils/fakecomponents.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ILogger } from '../../src/interfaces.js'

export class FakeLogger implements ILogger {
info() {}
logCommand() {}
debug(){}
error(){}
logError() {}
showLog() {}
info() { return }
logCommand() { return }
debug() { return }
error() { return }
logError() { return }
showLog() { return }
}

0 comments on commit 073a380

Please sign in to comment.