mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
eslint updates
This commit is contained in:
parent
2ef756df26
commit
2fd333ec3a
13
.eslintrc
13
.eslintrc
@ -5,7 +5,11 @@
|
||||
"ecmaFeatures": {
|
||||
"jsx": false
|
||||
},
|
||||
"project": "./tsconfig.json"
|
||||
"project": [
|
||||
"./tsconfig.json",
|
||||
"./test/tsconfig.json",
|
||||
"./integration/tsconfig.json"
|
||||
]
|
||||
},
|
||||
"extends": [
|
||||
"oceanprotocol",
|
||||
@ -20,8 +24,10 @@
|
||||
"error",
|
||||
{ "multiline": { "delimiter": "none" } }
|
||||
],
|
||||
"@typescript-eslint/ban-ts-ignore": "off",
|
||||
"@typescript-eslint/indent": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-inferrable-types": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||
@ -29,10 +35,7 @@
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"@typescript-eslint/no-object-literal-type-assertion": "off",
|
||||
"@typescript-eslint/no-parameter-properties": "off",
|
||||
"no-empty": [
|
||||
"error",
|
||||
{ "allowEmptyCatch": true }
|
||||
],
|
||||
"no-empty": ["error", { "allowEmptyCatch": true }],
|
||||
"prefer-destructuring": ["warn"],
|
||||
"no-dupe-class-members": ["warn"],
|
||||
"no-useless-constructor": ["warn"]
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { assert } from 'chai'
|
||||
|
||||
import { config } from '../config'
|
||||
|
||||
import { Ocean, Account } from '../../src' // @oceanprotocol/squid
|
||||
|
||||
describe('Authentication Token', () => {
|
||||
@ -56,8 +54,10 @@ describe('Authentication Token', () => {
|
||||
})
|
||||
|
||||
it('should know if the token is stored', async () => {
|
||||
let acc1Stored
|
||||
let acc2Stored
|
||||
let acc1Stored: boolean
|
||||
let acc2Stored: boolean
|
||||
|
||||
// eslint-disable-next-line
|
||||
acc1Stored = await ocean.auth.isStored(account1)
|
||||
acc2Stored = await ocean.auth.isStored(account2)
|
||||
|
||||
|
@ -86,7 +86,6 @@ describe('Signature', () => {
|
||||
|
||||
assert.equal(
|
||||
signature,
|
||||
// tslint:disable-next-line
|
||||
'0x3aa8a1c48b8e582d694bbd4ba3a29fde573b78da9720dc48baeb831b2163e1fa6e10e983882ebf8a00f4124de2505136354fd146934053f0d58bba4eced5f8d000',
|
||||
'The signatuere is not correct.'
|
||||
)
|
||||
|
@ -82,13 +82,9 @@ export abstract class Instantiable {
|
||||
instance._logger = logger
|
||||
}
|
||||
|
||||
// tslint:disable-next-line
|
||||
private _ocean: Ocean
|
||||
// tslint:disable-next-line
|
||||
private _web3: Web3
|
||||
// tslint:disable-next-line
|
||||
private _config: Config
|
||||
// tslint:disable-next-line
|
||||
private _logger: Logger
|
||||
|
||||
protected setInstanceConfig(config: InstantiableConfig) {
|
||||
|
@ -41,7 +41,6 @@ export class Brizo extends Instantiable {
|
||||
_notUsed: string,
|
||||
container: string
|
||||
) {
|
||||
// tslint:disable-next-line
|
||||
return `${this.url}${apiPath}/compute`
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
import ContractBase from './contracts/ContractBase'
|
||||
|
||||
interface EventEmitter {
|
||||
// tslint:disable-next-line
|
||||
subscribe: Function
|
||||
// tslint:disable-next-line
|
||||
unsubscribe: Function
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@ export abstract class AgreementTemplate extends ContractBase {
|
||||
super(contractName)
|
||||
}
|
||||
|
||||
// tslint:disable-next-line
|
||||
public createAgreement(
|
||||
agreementId: string,
|
||||
did: string,
|
||||
|
@ -83,7 +83,6 @@ describe('DDO', () => {
|
||||
},
|
||||
{
|
||||
type: 'Compute',
|
||||
// tslint:disable-next-line
|
||||
serviceEndpoint:
|
||||
'http://mybrizo.org/api/v1/brizo/services/compute?pubKey={pubKey}&serviceId={serviceId}&algo={algo}&container={container}'
|
||||
},
|
||||
|
@ -7,8 +7,7 @@ describe('ContractHandler', () => {
|
||||
let contractHandler: ContractHandler
|
||||
|
||||
before(async () => {
|
||||
const instanceConfig = ((await Ocean.getInstance(config)) as any)
|
||||
.instanceConfig
|
||||
const { instanceConfig } = (await Ocean.getInstance(config)) as any
|
||||
|
||||
contractHandler = new ContractHandler(instanceConfig)
|
||||
})
|
||||
|
@ -16,7 +16,7 @@ describe('EscrowReward', () => {
|
||||
let releaseCondition
|
||||
|
||||
before(async () => {
|
||||
const keeper = (await Ocean.getInstance(config)).keeper
|
||||
const { keeper } = await Ocean.getInstance(config)
|
||||
|
||||
await TestContractHandler.prepareContracts()
|
||||
condition = keeper.conditions.escrowReward
|
||||
|
Loading…
Reference in New Issue
Block a user