Skip to content

Commit

Permalink
*: Update prettier and eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
fordN committed May 3, 2022
1 parent 2bb3864 commit 824c521
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/indexer-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "Graph Protocol",
"private": false,
"scripts": {
"format": "prettier --write src/*.ts src/**/*.ts src/**/**/*.ts",
"format": "prettier --write 'src/**/*.ts'",
"lint": "eslint . --ext .ts,.tsx --fix",
"compile": "tsc",
"prepare": "yarn format && yarn lint && yarn compile",
Expand Down Expand Up @@ -62,7 +62,7 @@
"@typescript-eslint/eslint-plugin": "5.19.0",
"@typescript-eslint/parser": "5.19.0",
"eslint": "8.13.0",
"eslint-config-prettier": "8.5.0",
"eslint-config-prettier": "^8.5.0",
"jest": "27.5.1",
"prettier": "2.6.2",
"ts-jest": "27.1.4",
Expand Down
1 change: 0 additions & 1 deletion packages/indexer-agent/src/commands/start.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import path from 'path'

import { Argv } from 'yargs'
import { SequelizeStorage, Umzug } from 'umzug'
import {
Expand Down
24 changes: 10 additions & 14 deletions packages/indexer-cli/src/commands/indexer/allocations/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,10 @@ import { loadValidatedConfig } from '../../../config'
import { createIndexerManagementClient } from '../../../client'
import { fixParameters } from '../../../command-helpers'
import gql from 'graphql-tag'
// import { printIndexerAllocations } from '../../../allocations'
import { SubgraphDeploymentID } from '@graphprotocol/common-ts'
import {
parseGraphQLAllocation,
processIdentifier,
SubgraphIdentifierType,
} from '@graphprotocol/indexer-common'
import {
displayIndexerAllocations,
IndexerAllocation,
printIndexerAllocations,
} from '../../../allocations'
import { BigNumber } from 'ethers'
import { processIdentifier, SubgraphIdentifierType } from '@graphprotocol/indexer-common'
import { IndexerAllocation, printIndexerAllocations } from '../../../allocations'
import { utils } from 'ethers'

const HELP = `
${chalk.bold('graph indexer allocations get')} [options]
Expand Down Expand Up @@ -59,6 +50,10 @@ module.exports = {
throw Error(`Invalid '--status' must be one of 'active', 'closed' or 'claimable'`)
}

if (allocation && !utils.isHexString(allocation, 20)) {
throw Error(`Invalid 'allocation-id', '${allocation}', must be a bytes20 string`)
}

let deploymentString: string | undefined = undefined
let type: SubgraphIdentifierType

Expand Down Expand Up @@ -114,11 +109,12 @@ module.exports = {
throw result.error
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const allocations = deploymentString
? result.data.allocations.filter((allocation: any) => {
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
result.data.allocations.filter((allocation: any) => {
return (
new SubgraphDeploymentID(allocation.subgraphDeployment).toString() ===
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
new SubgraphDeploymentID(deploymentString!).toString()
)
})
Expand Down
1 change: 1 addition & 0 deletions packages/indexer-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"ngeohash": "0.6.3",
"p-filter": "2.1.0",
"p-retry": "4.6.1",
"p-timeout": "4.1.0",
"sequelize": "6.18.0",
"ts-custom-error": "^3.2.0"
},
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4656,7 +4656,7 @@ escodegen@^2.0.0:
optionalDependencies:
source-map "~0.6.1"

[email protected]:
[email protected], eslint-config-prettier@^8.5.0:
version "8.5.0"
resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1"
integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==
Expand Down Expand Up @@ -8217,6 +8217,11 @@ [email protected]:
"@types/retry" "^0.12.0"
retry "^0.13.1"

[email protected]:
version "4.1.0"
resolved "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz#788253c0452ab0ffecf18a62dff94ff1bd09ca0a"
integrity sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==

p-timeout@^3.2.0:
version "3.2.0"
resolved "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz"
Expand Down

0 comments on commit 824c521

Please sign in to comment.