1
0
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:
Matthias Kretschmann 2019-08-15 14:13:21 +02:00
parent 2ef756df26
commit 2fd333ec3a
Signed by: m
GPG Key ID: 606EEEF3C479A91F
10 changed files with 14 additions and 22 deletions

View File

@ -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"]

View File

@ -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)

View File

@ -86,7 +86,6 @@ describe('Signature', () => {
assert.equal(
signature,
// tslint:disable-next-line
'0x3aa8a1c48b8e582d694bbd4ba3a29fde573b78da9720dc48baeb831b2163e1fa6e10e983882ebf8a00f4124de2505136354fd146934053f0d58bba4eced5f8d000',
'The signatuere is not correct.'
)

View File

@ -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) {

View File

@ -41,7 +41,6 @@ export class Brizo extends Instantiable {
_notUsed: string,
container: string
) {
// tslint:disable-next-line
return `${this.url}${apiPath}/compute`
}

View File

@ -1,9 +1,7 @@
import ContractBase from './contracts/ContractBase'
interface EventEmitter {
// tslint:disable-next-line
subscribe: Function
// tslint:disable-next-line
unsubscribe: Function
}

View File

@ -36,7 +36,6 @@ export abstract class AgreementTemplate extends ContractBase {
super(contractName)
}
// tslint:disable-next-line
public createAgreement(
agreementId: string,
did: string,

View File

@ -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}'
},

View File

@ -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)
})

View File

@ -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