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