Skip to content

Commit 7cdbe5a

Browse files
authored
Lint cleanup (#1477)
* Updated gitignore * Swapped eslint-config-airbnb-extended for the typescript-eslint * Replaced @stellar/tsconfig with local config * Updated docs * Updated comment * Updated docs
1 parent 6a2b21e commit 7cdbe5a

27 files changed

Lines changed: 325 additions & 933 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ config/tsconfig.tmp.json
4141

4242
# scratch: per-guide tests, never shipped
4343
test-guides/
44+
.vuln-hunt/

docs/reference/contracts-client.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ _before_ transaction signing.
791791
const DEFAULT_TIMEOUT: number
792792
```
793793
794-
**Source:** [src/contract/types.ts:302](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L302)
794+
**Source:** [src/contract/types.ts:303](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L303)
795795
796796
## contract.NULL_ACCOUNT
797797
@@ -801,7 +801,7 @@ An impossible account on the Stellar network
801801
const NULL_ACCOUNT: "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"
802802
```
803803
804-
**Source:** [src/contract/types.ts:308](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L308)
804+
**Source:** [src/contract/types.ts:309](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L309)
805805
806806
## contract.SentTransaction
807807
@@ -1341,7 +1341,7 @@ basicNodeSigner(keypair: Keypair, networkPassphrase: string): { signAuthEntry: S
13411341
type AssembledTransactionOptions<T = string> = MethodOptions & ClientOptions & { address?: string; args?: any[]; method: string; parseResultXdr: (xdr: xdr.ScVal) => T; submit?: boolean; submitUrl?: string }
13421342
```
13431343
1344-
**Source:** [src/contract/types.ts:270](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L270)
1344+
**Source:** [src/contract/types.ts:271](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L271)
13451345
13461346
### contract.ClientOptions
13471347
@@ -1351,7 +1351,7 @@ Options for a smart contract client.
13511351
type ClientOptions = { allowHttp?: boolean; contractId: string; errorTypes?: Record<number, { message: string }>; headers?: Record<string, string>; networkPassphrase: string; publicKey?: string; rpcUrl: string; server?: Server; signAuthEntry?: SignAuthEntry; signTransaction?: SignTransaction }
13521352
```
13531353
1354-
**Source:** [src/contract/types.ts:127](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L127)
1354+
**Source:** [src/contract/types.ts:128](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L128)
13551355
13561356
### contract.Duration
13571357
@@ -1361,7 +1361,7 @@ An unsigned 64-bit integer.
13611361
type Duration = bigint
13621362
```
13631363
1364-
**Source:** [src/contract/types.ts:53](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L53)
1364+
**Source:** [src/contract/types.ts:54](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L54)
13651365
13661366
### contract.ErrorMessage
13671367
@@ -1395,15 +1395,15 @@ Options for a smart contract method invocation.
13951395
type MethodOptions = { authV2?: boolean; fee?: string; publicKey?: string; restore?: boolean; signAuthEntry?: SignAuthEntry; signTransaction?: SignTransaction; simulate?: boolean; timeoutInSeconds?: number }
13961396
```
13971397
1398-
**Source:** [src/contract/types.ts:203](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L203)
1398+
**Source:** [src/contract/types.ts:204](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L204)
13991399
14001400
### contract.Option
14011401
14021402
```ts
14031403
type Option<T> = T | undefined
14041404
```
14051405
1406-
**Source:** [src/contract/types.ts:41](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L41)
1406+
**Source:** [src/contract/types.ts:42](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L42)
14071407
14081408
### contract.Result
14091409
@@ -1492,7 +1492,7 @@ It returns a signed hash of the same authorization entry and the signer address
14921492
type SignAuthEntry = (authEntry: string, opts?: { address?: string; networkPassphrase?: string }) => Promise<{ signedAuthEntry: string; signerAddress?: string } & { error?: WalletError }>
14931493
```
14941494
1495-
**Source:** [src/contract/types.ts:111](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L111)
1495+
**Source:** [src/contract/types.ts:112](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L112)
14961496
14971497
### contract.SignTransaction
14981498
@@ -1506,7 +1506,7 @@ and the signer address back to the requester.
15061506
type SignTransaction = (xdr: string, opts?: { address?: string; networkPassphrase?: string; submit?: boolean; submitUrl?: string }) => Promise<{ signedTxXdr: string; signerAddress?: string } & { error?: WalletError }>
15071507
```
15081508
1509-
**Source:** [src/contract/types.ts:82](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L82)
1509+
**Source:** [src/contract/types.ts:83](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L83)
15101510
15111511
### contract.Timepoint
15121512
@@ -1516,7 +1516,7 @@ An unsigned 64-bit integer.
15161516
type Timepoint = bigint
15171517
```
15181518
1519-
**Source:** [src/contract/types.ts:49](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L49)
1519+
**Source:** [src/contract/types.ts:50](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L50)
15201520
15211521
### contract.Tx
15221522
@@ -1526,7 +1526,7 @@ A "regular" transaction, as opposed to a FeeBumpTransaction.
15261526
type Tx = Transaction
15271527
```
15281528
1529-
**Source:** [src/contract/types.ts:58](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L58)
1529+
**Source:** [src/contract/types.ts:59](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L59)
15301530
15311531
### contract.Typepoint
15321532
@@ -1536,7 +1536,7 @@ type Tx = Transaction
15361536
type Typepoint = bigint
15371537
```
15381538
1539-
**Source:** [src/contract/types.ts:45](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L45)
1539+
**Source:** [src/contract/types.ts:46](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L46)
15401540
15411541
### contract.Union
15421542
@@ -1575,39 +1575,39 @@ interface WalletError {
15751575
}
15761576
```
15771577

1578-
**Source:** [src/contract/types.ts:60](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L60)
1578+
**Source:** [src/contract/types.ts:61](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L61)
15791579

15801580
#### `walletError.code`
15811581

15821582
```ts
15831583
code: number;
15841584
```
15851585

1586-
**Source:** [src/contract/types.ts:62](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L62)
1586+
**Source:** [src/contract/types.ts:63](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L63)
15871587

15881588
#### `walletError.ext`
15891589

15901590
```ts
15911591
ext?: string[];
15921592
```
15931593

1594-
**Source:** [src/contract/types.ts:63](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L63)
1594+
**Source:** [src/contract/types.ts:64](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L64)
15951595

15961596
#### `walletError.message`
15971597

15981598
```ts
15991599
message: string;
16001600
```
16011601

1602-
**Source:** [src/contract/types.ts:61](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L61)
1602+
**Source:** [src/contract/types.ts:62](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L62)
16031603

16041604
### contract.XDR_BASE64
16051605

16061606
```ts
16071607
type XDR_BASE64 = string
16081608
```
16091609
1610-
**Source:** [src/contract/types.ts:8](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L8)
1610+
**Source:** [src/contract/types.ts:9](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L9)
16111611
16121612
### contract.i128
16131613
@@ -1617,7 +1617,7 @@ A signed 128-bit integer.
16171617
type i128 = bigint
16181618
```
16191619
1620-
**Source:** [src/contract/types.ts:32](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L32)
1620+
**Source:** [src/contract/types.ts:33](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L33)
16211621
16221622
### contract.i256
16231623
@@ -1627,7 +1627,7 @@ A signed 256-bit integer.
16271627
type i256 = bigint
16281628
```
16291629
1630-
**Source:** [src/contract/types.ts:40](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L40)
1630+
**Source:** [src/contract/types.ts:41](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L41)
16311631
16321632
### contract.i32
16331633
@@ -1637,7 +1637,7 @@ A signed 32-bit integer.
16371637
type i32 = number
16381638
```
16391639
1640-
**Source:** [src/contract/types.ts:16](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L16)
1640+
**Source:** [src/contract/types.ts:17](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L17)
16411641
16421642
### contract.i64
16431643
@@ -1647,7 +1647,7 @@ A signed 64-bit integer.
16471647
type i64 = bigint
16481648
```
16491649
1650-
**Source:** [src/contract/types.ts:24](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L24)
1650+
**Source:** [src/contract/types.ts:25](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L25)
16511651
16521652
### contract.u128
16531653
@@ -1657,7 +1657,7 @@ An unsigned 128-bit integer.
16571657
type u128 = bigint
16581658
```
16591659
1660-
**Source:** [src/contract/types.ts:28](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L28)
1660+
**Source:** [src/contract/types.ts:29](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L29)
16611661
16621662
### contract.u256
16631663
@@ -1667,7 +1667,7 @@ An unsigned 256-bit integer.
16671667
type u256 = bigint
16681668
```
16691669
1670-
**Source:** [src/contract/types.ts:36](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L36)
1670+
**Source:** [src/contract/types.ts:37](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L37)
16711671
16721672
### contract.u32
16731673
@@ -1677,7 +1677,7 @@ An unsigned 32-bit integer.
16771677
type u32 = number
16781678
```
16791679
1680-
**Source:** [src/contract/types.ts:12](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L12)
1680+
**Source:** [src/contract/types.ts:13](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L13)
16811681
16821682
### contract.u64
16831683
@@ -1687,4 +1687,4 @@ An unsigned 64-bit integer.
16871687
type u64 = bigint
16881688
```
16891689
1690-
**Source:** [src/contract/types.ts:20](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L20)
1690+
**Source:** [src/contract/types.ts:21](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L21)

0 commit comments

Comments
 (0)