subgraph/core/src/DisputeKitClassic.ts
Function handleVoteCast
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function handleVoteCast(event: VoteCast): void {
const juror = event.params._juror.toHexString();
const coreDisputeID = event.params._coreDisputeID.toString();
const coreDispute = Dispute.load(coreDisputeID);
const classicDisputeID = `${DISPUTEKIT_ID}-${coreDisputeID}`;
- Create a ticketCreate a ticket
Function handleChoiceFunded
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function handleChoiceFunded(event: ChoiceFunded): void {
const coreDisputeID = event.params._coreDisputeID.toString();
const coreRoundIndex = event.params._coreRoundID.toString();
const choice = event.params._choice;
const roundID = `${DISPUTEKIT_ID}-${coreDisputeID}-${coreRoundIndex}`;
- Create a ticketCreate a ticket
Expected a 'for-of' loop instead of a 'for' loop with this simple iteration Open
Open
for (let i = 0; i < voteIDs.length; i++) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Rule: prefer-for-of
Recommends a 'for-of' loop over a standard 'for' loop if the index is only used to access the array being iterated.
Rationale
A for(... of ...) loop is easier to implement and read when the index is not needed.
Config
Not configurable.
Examples
"prefer-for-of": true
For more information see this page.
Expected a 'for-of' loop instead of a 'for' loop with this simple iteration Open
Open
for (let i = 0; i < voteIDs.length; i++) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Rule: prefer-for-of
Recommends a 'for-of' loop over a standard 'for' loop if the index is only used to access the array being iterated.
Rationale
A for(... of ...) loop is easier to implement and read when the index is not needed.
Config
Not configurable.
Examples
"prefer-for-of": true
For more information see this page.