contracts/deploy/05-arbitrable-dispute-template.ts
Function deployResolver
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const deployResolver: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { ethers } = hre;
const template = `{
"$schema": "../NewDisputeTemplate.schema.json",
- Create a ticketCreate a ticket
Identifier 'tx' is never reassigned; use 'const' instead of 'let'. Open
Open
let tx = await (await arbitrable.changeDisputeTemplate(template, "disputeTemplateMapping: TODO")).wait();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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.