1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

add lint fix command

This commit is contained in:
Ahmed Ali 2020-06-24 12:43:34 +02:00
parent c63b300668
commit 08abba772e
3 changed files with 7 additions and 6 deletions

View File

@ -11,6 +11,7 @@
"build:metadata": "./scripts/get-metadata.js > src/metadata.json",
"clean": "rm -rf ./dist/ ./doc/ ./.nyc_output",
"lint": "eslint --ignore-path .gitignore --ext .ts,.tsx .",
"lint:fix": "eslint --ignore-path .gitignore --ext .ts,.tsx . --fix",
"format": "prettier --parser typescript --ignore-path .gitignore --write '**/*.{js,jsx,ts,tsx}'",
"run": "ts-node",
"release": "release-it --non-interactive",

View File

@ -406,7 +406,7 @@ export class Aquarius {
public getURI() {
return `${this.url}`
}
private transformResult(
{ results, page, total_pages: totalPages, total_results: totalResults }: any = {
result: [],

View File

@ -200,14 +200,13 @@ export class Assets extends Instantiable {
return this.ocean.aquarius.retrieveDDOByUrl(serviceEndpoint)
}
public async resolveByDTAddress(
dtAddress: string,
offset?: number,
page? : number,
sort? : number,
query? : number
) : Promise<QueryResult> {
page?: number,
sort?: number,
query?: number
): Promise<QueryResult> {
const searchQuery = {
offset: offset || 100,
page: page || 1,
@ -221,6 +220,7 @@ export class Assets extends Instantiable {
} as SearchQuery
return this.ocean.aquarius.queryMetadata(searchQuery)
}
/**
* Edit Metadata for a DDO.
* @param {did} string DID.