Skip to content

Commit

Permalink
Merge #848 #900 #901
Browse files Browse the repository at this point in the history
848: docs(Reference): Give object parameters a name if they will be includ… r=davemneo a=afragapane

With dgeni typescript parsing, function parameters display awkwardly if they are unnamed objects.
Giving them a name like "options" fixes the issue and displays them properly.

#702

900: chore(dep-update): Updating code style of ReferenceGrid r=dicarlo2 a=davemneo

### Requirements

Update asserted code per new lint rules.

### Description of the Change

remove 'any' type casting from identified file.

### Test Plan

Standard lint test
    yarn lint

### Benefits

Green lint test.

### Applicable Issues

#758

901: chore(deps): update dependency tslint-consistent-codestyle to v1.15.0 r=davemneo a=renovate[bot]

This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| tslint-consistent-codestyle | devDependencies | minor | `1.14.1` -> `1.15.0` | [source](https://renovatebot.com/gh/ajafff/tslint-consistent-codestyle) |

---

### Release Notes

<details>
<summary>ajafff/tslint-consistent-codestyle</summary>

### [`v1.15.0`](https://renovatebot.com/gh/ajafff/tslint-consistent-codestyle/blob/master/CHANGELOG.md#&#8203;1150)

[Compare Source](https://renovatebot.com/gh/ajafff/tslint-consistent-codestyle/compare/v1.14.1...v1.15.0)

**Features:**

-   `no-unnecessary-else` and `no-else-after-return` are now automatically fixable

</details>

---

### Renovate configuration

:date: **Schedule**: At any time (no schedule defined).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with "`rebase!`".

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://renovatebot.com/gh/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#neo-one-suite/neo-one).

Co-authored-by: afragapane <ahfragapane@gmail.com>
Co-authored-by: Dave M <david.mathiesen@neotracker.io>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
  • Loading branch information
4 people committed Jan 4, 2019
4 parents bbde4a7 + 4693ce9 + cba2193 + 0302e38 commit 3e3ae7e
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"tslint": "5.12.0",
"tslint-clean-code": "0.2.9",
"tslint-config-prettier": "1.17.0",
"tslint-consistent-codestyle": "1.14.1",
"tslint-consistent-codestyle": "1.15.0",
"tslint-immutable": "4.9.1",
"tslint-microsoft-contrib": "5.2.1",
"tslint-sonarts": "1.8.0",
Expand Down
13 changes: 5 additions & 8 deletions packages/neo-one-client-common/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ export function isNEP2(encryptedKey: string): boolean {
* @param privateKey hex-encoded private key
* @returns NEP-2 format encrypted key
*/
export async function encryptNEP2({
password,
privateKey,
}: {
export async function encryptNEP2(options: {
readonly password: string;
readonly privateKey: PrivateKeyString;
}): Promise<string> {
const { password, privateKey } = options;

return crypto.encryptNEP2({
addressVersion: common.NEO_ADDRESS_VERSION,
privateKey: common.stringToPrivateKey(privateKey),
Expand All @@ -144,13 +143,11 @@ export async function encryptNEP2({
* @param encryptedKey NEP-2 format encrypted key
* @returns hex-encoded private key
*/
export async function decryptNEP2({
password,
encryptedKey,
}: {
export async function decryptNEP2(options: {
readonly password: string;
readonly encryptedKey: string;
}): Promise<PrivateKeyString> {
const { password, encryptedKey } = options;
const privateKey = await crypto.decryptNEP2({
addressVersion: common.NEO_ADDRESS_VERSION,
encryptedKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,8 @@ export class NEOONEOneDataProvider implements DeveloperProvider {
private readonly iterBlocksFetchTimeoutMS: number | undefined;
private readonly iterBlocksBatchSize: number | undefined;

public constructor({
network,
projectID,
port,
iterBlocksFetchTimeoutMS,
iterBlocksBatchSize,
}: NEOONEOneDataProviderOptions) {
public constructor(options: NEOONEOneDataProviderOptions) {
const { network, projectID, port, iterBlocksFetchTimeoutMS, iterBlocksBatchSize } = options;
this.network = network;
this.projectID = projectID;
this.port = port;
Expand Down
3 changes: 2 additions & 1 deletion packages/neo-one-client-core/src/provider/NEOONEProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export class NEOONEProvider implements Provider {
return this.networksInternal$.getValue();
}

public addNetwork({ network, rpcURL }: { readonly network: NetworkType; readonly rpcURL: string }): void {
public addNetwork(options: { readonly network: NetworkType; readonly rpcURL: string }): void {
const { network, rpcURL } = options;
this.mutableProviders[network] = new NEOONEDataProvider({ network, rpcURL });
const networks = this.networksInternal$.value.filter((net) => network !== net).concat([network]);
this.networksInternal$.next(networks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ export class LocalUserAccountProvider<TKeyStore extends KeyStore, TProvider exte
protected readonly mutableUsedOutputs: Set<string>;
protected mutableBlockCount: number;

public constructor({ keystore, provider }: { readonly keystore: TKeyStore; readonly provider: TProvider }) {
public constructor(constructorOptions: { readonly keystore: TKeyStore; readonly provider: TProvider }) {
const { keystore, provider } = constructorOptions;
this.keystore = keystore;
this.provider = provider;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// tslint:disable no-any
import { Box, TextInput } from '@neo-one/react-common';
import * as React from 'react';
import styled from 'styled-components';
Expand Down Expand Up @@ -45,7 +44,7 @@ export const ReferenceGrid = ({ content, ...props }: Props) => {
<Wrapper {...props}>
<FilterWrapper>
<TypeFilter selected={typeFilter} onChange={setTypeFilter} />
<StyledInput placeholder="Filter" onChange={(event) => setTextFilter((event.target as any).value)} />
<StyledInput placeholder="Filter" onChange={(event) => setTextFilter(event.target.value)} />
</FilterWrapper>
<ReferenceLayout>
{content
Expand Down
32 changes: 19 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1360,18 +1360,18 @@
version "0.2.2"
resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.2.tgz#63985d3d8b02530e0869962f4da09142ee8e200e"

"@fimbul/bifrost@^0.15.0":
version "0.15.0"
resolved "https://registry.yarnpkg.com/@fimbul/bifrost/-/bifrost-0.15.0.tgz#f3a48dee3046681e926c1f970f0b1a67e29e088e"
"@fimbul/bifrost@^0.17.0":
version "0.17.0"
resolved "https://registry.yarnpkg.com/@fimbul/bifrost/-/bifrost-0.17.0.tgz#f0383ba7e40992e3193dc87e2ddfde2ad62a9cf4"
dependencies:
"@fimbul/ymir" "^0.15.0"
"@fimbul/ymir" "^0.17.0"
get-caller-file "^2.0.0"
tslib "^1.8.1"
tsutils "^3.1.0"
tsutils "^3.5.0"

"@fimbul/ymir@^0.15.0":
version "0.15.0"
resolved "https://registry.yarnpkg.com/@fimbul/ymir/-/ymir-0.15.0.tgz#944c881b14fadf7b43d1ae00b445e42261bb407f"
"@fimbul/ymir@^0.17.0":
version "0.17.0"
resolved "https://registry.yarnpkg.com/@fimbul/ymir/-/ymir-0.17.0.tgz#4f28389b9f804d1cd202e11983af1743488b7815"
dependencies:
inversify "^5.0.0"
reflect-metadata "^0.1.12"
Expand Down Expand Up @@ -18268,11 +18268,11 @@ tslint-config-prettier@1.17.0:
version "1.17.0"
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.17.0.tgz#946ed6117f98f3659a65848279156d87628c33dc"

tslint-consistent-codestyle@1.14.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslint-consistent-codestyle/-/tslint-consistent-codestyle-1.14.1.tgz#8555f1b05ccbf093166a73347f41eb101731a522"
tslint-consistent-codestyle@1.15.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/tslint-consistent-codestyle/-/tslint-consistent-codestyle-1.15.0.tgz#a3acf8d0a3ca0dc7d1285705102ba1fe4a17c4cb"
dependencies:
"@fimbul/bifrost" "^0.15.0"
"@fimbul/bifrost" "^0.17.0"
tslib "^1.7.1"
tsutils "^2.29.0"

Expand Down Expand Up @@ -18327,12 +18327,18 @@ tsutils@^2.27.2, tsutils@^2.29.0:
dependencies:
tslib "^1.8.1"

tsutils@^3.0.0, tsutils@^3.1.0:
tsutils@^3.0.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.5.0.tgz#42602f7df241e753a2105cc3627a664abf11f745"
dependencies:
tslib "^1.8.1"

tsutils@^3.5.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.6.0.tgz#33fc3ddb74abf5bba10789acd03eee6ea96c839c"
dependencies:
tslib "^1.8.1"

tty-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
Expand Down

0 comments on commit 3e3ae7e

Please sign in to comment.