Re-enable unified-signatures

This commit is contained in:
Oliver Blanthorn 2020-06-19 13:11:03 +01:00
parent a6ca46d147
commit beebb6ffe5
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 4 additions and 5 deletions

View file

@ -154,7 +154,7 @@ module.exports = {
], ],
"@typescript-eslint/type-annotation-spacing": "error", "@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "off", //"error", "@typescript-eslint/unbound-method": "off", //"error",
"@typescript-eslint/unified-signatures": "off", //"error", "@typescript-eslint/unified-signatures": "error",
"arrow-body-style": "error", "arrow-body-style": "error",
"arrow-parens": [ "arrow-parens": [
"off", "off",

7
src/tridactyl.d.ts vendored
View file

@ -48,9 +48,7 @@ interface findResult {
interface HTMLElement { interface HTMLElement {
// Let's be future proof: // Let's be future proof:
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
focus(options: any): void focus(options?: any): void
// Let's also implement the current function signature.
focus(): void
} }
/* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/ban-types */
@ -67,9 +65,10 @@ declare namespace browser.find {
function find(query, object): any function find(query, object): any
} }
// setZoom has an optional first argument of tabId. Unclear how first argument can be optional.
declare namespace browser.tabs { declare namespace browser.tabs {
function setZoom(zoomFactor: number): Promise<void> function setZoom(zoomFactor: number): Promise<void>
// setZoom has an optional first argument of tabId: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/setZoom#Parameters
// eslint-disable-next-line @typescript-eslint/unified-signatures
function setZoom(tabId: number, zoomFactor: number): Promise<void> function setZoom(tabId: number, zoomFactor: number): Promise<void>
function toggleReaderMode(tabId?: number): Promise<void> function toggleReaderMode(tabId?: number): Promise<void>
} }