Skip to content

Commit

Permalink
remove magic numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
melotik committed Oct 24, 2023
1 parent 286d52e commit e88e11c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
9 changes: 0 additions & 9 deletions subgraphs/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ module.exports = {
},
],

// disallow magic numbers: https://eslint.org/docs/latest/rules/no-magic-numbers
"@typescript-eslint/no-magic-numbers": [
"error",
{
ignoreArrayIndexes: true,
ignore: [-1, 0, 1, 2],
},
],

// CUSTOM RULES, find them in subgraphs/_eslint-rules
// -----------------------------------------------

Expand Down
2 changes: 0 additions & 2 deletions subgraphs/_reference_/src/common/utils/strings.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* eslint-disable @typescript-eslint/no-magic-numbers */
import { BigInt } from "@graphprotocol/graph-ts";

export function hexToNumberString(hex: string): string {
let hexNumber = BigInt.fromI32(0);

/* eslint-disable-next-line rulesdir/no-string-literals */
if (hex.startsWith("0x")) {
hex = hex.slice(2);
}
Expand Down

0 comments on commit e88e11c

Please sign in to comment.