kleros/kleros-v2

View on GitHub
contracts/deploy/05-arbitrable-dispute-template.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function deployResolver has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const deployResolver: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
  const { ethers } = hre;

  const template = `{
    "$schema": "../NewDisputeTemplate.schema.json",
Severity: Minor
Found in contracts/deploy/05-arbitrable-dispute-template.ts - About 1 hr to fix

Identifier 'tx' is never reassigned; use 'const' instead of 'let'.
Open

  let tx = await (await arbitrable.changeDisputeTemplate(template, "disputeTemplateMapping: TODO")).wait();

Rule: prefer-const

Requires that variable declarations use const instead of let and var if possible.

If a variable is only assigned to once when it is declared, it should be declared using 'const'

Notes
  • Has Fix

Config

An optional object containing the property "destructuring" with two possible values:

  • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
  • "all" - Only warns if all variables in destructuring can be const.
Examples
"prefer-const": true
"prefer-const": true,[object Object]
Schema
{
  "type": "object",
  "properties": {
    "destructuring": {
      "type": "string",
      "enum": [
        "all",
        "any"
      ]
    }
  }
}

For more information see this page.

There are no issues that match your filters.

Category
Status