-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update eslint-config-ipfs and fix lint
- Loading branch information
Showing
19 changed files
with
833 additions
and
367 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,9 @@ | ||
/* eslint-disable @typescript-eslint/consistent-type-definitions */ | ||
/* eslint-disable etc/prefer-interface */ | ||
|
||
declare module '@dutu/rate-limiter' | ||
declare module 'ipfs-geoip' | ||
|
||
// declare global { | ||
/** | ||
* An interface that allows various properties for gateways to be checked | ||
*/ | ||
interface Checkable { | ||
|
||
// @todo: Update to async/await | ||
// check: () => Promise<void> | ||
check: () => void | ||
checked: () => void | ||
|
||
onerror: () => void | ||
} | ||
|
||
/** | ||
* A class implementing the Visible interface supports functionality that can make it visible in the UI | ||
*/ | ||
interface Visible { | ||
tag: import('./Tag').Tag | ||
_tagName: string | ||
_className: string | ||
} | ||
|
||
interface Window { | ||
OnScriptloaded: typeof import('./onScriptLoaded').onScriptLoaded | ||
checker: import('./Checker').Checker | ||
} | ||
|
||
declare namespace IpfsGeoip { | ||
interface LookupResponse { | ||
country_code: string | ||
country_name: string | ||
} | ||
} | ||
interface DnsQueryResponseAnswer { name: string, type: number, TTL: number, data: string } | ||
interface DnsQueryResponseQuestion { name: string, type: number } | ||
|
||
interface DnsQueryResponseAuthority { | ||
TTL: number | ||
data: string // "aragorn.ns.cloudflare.com. dns.cloudflare.com. 2271826322 10000 2400 604800 3600" | ||
name: string // "stibarc.com" | ||
type: number | ||
} | ||
|
||
interface DnsQueryResponse { | ||
AD: boolean | ||
Answer?: DnsQueryResponseAnswer[] | ||
Authority?: DnsQueryResponseAuthority[] | ||
CD: boolean | ||
Question: DnsQueryResponseQuestion[] | ||
RA: boolean | ||
RD: boolean | ||
Status: number | ||
TC: boolean | ||
} | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import type { Checker } from './Checker' | ||
import type { Tag } from './Tag' | ||
// import type onScriptLoaded from './onScriptLoaded' | ||
|
||
declare global { | ||
interface Window { | ||
// OnScriptloaded: onScriptLoaded | ||
checker: Checker | ||
} | ||
} | ||
/** | ||
* An interface that allows various properties for gateways to be checked | ||
*/ | ||
export interface Checkable { | ||
|
||
// @todo: Update to async/await | ||
// check: () => Promise<void> | ||
check: () => void | ||
checked: () => void | ||
|
||
onerror: () => void | ||
} | ||
|
||
/** | ||
* A class implementing the Visible interface supports functionality that can make it visible in the UI | ||
*/ | ||
export interface Visible { | ||
tag: Tag | ||
_tagName: string | ||
_className: string | ||
} | ||
|
||
export interface DnsQueryResponseAnswer { name: string, type: number, TTL: number, data: string } | ||
export interface DnsQueryResponseQuestion { name: string, type: number } | ||
|
||
export interface DnsQueryResponseAuthority { | ||
TTL: number | ||
data: string // "aragorn.ns.cloudflare.com. dns.cloudflare.com. 2271826322 10000 2400 604800 3600" | ||
name: string // "stibarc.com" | ||
type: number | ||
} | ||
|
||
export interface DnsQueryResponse { | ||
AD: boolean | ||
Answer?: DnsQueryResponseAnswer[] | ||
Authority?: DnsQueryResponseAuthority[] | ||
CD: boolean | ||
Question: DnsQueryResponseQuestion[] | ||
RA: boolean | ||
RD: boolean | ||
Status: number | ||
TC: boolean | ||
} |