linting for libs fixed

pull/19/head
aniket-engg 4 years ago committed by Aniket
parent d73e227177
commit 27238e00ee
  1. 3
      libs/remix-analyzer/.eslintrc
  2. 4
      libs/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts
  3. 1
      libs/remix-debug/src/solidity-decoder/internalCallTree.js

@ -1,7 +1,8 @@
{ {
"extends": "../../.eslintrc", "extends": "../../.eslintrc",
"rules": { "rules": {
"@typescript-eslint/no-explicit-any": "off" "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off"
}, },
"ignorePatterns": ["!**/*"] "ignorePatterns": ["!**/*"]
} }

@ -40,8 +40,8 @@ export default class lowLevelCalls implements AnalyzerModule {
report (compilationResults: CompilationResult): ReportObj[] { report (compilationResults: CompilationResult): ReportObj[] {
const version = getCompilerVersion(compilationResults.contracts) const version = getCompilerVersion(compilationResults.contracts)
return this.llcNodes.map((item, i) => { return this.llcNodes.map((item, i) => {
let text: string = '' let text = ''
let morehref: string = '' let morehref = ''
switch (item.type) { switch (item.type) {
case lowLevelCallTypes.CALL: case lowLevelCallTypes.CALL:
text = `Use of "call": should be avoided whenever possible. text = `Use of "call": should be avoided whenever possible.

@ -109,6 +109,7 @@ class InternalCallTree {
let functions = [] let functions = []
if (!scopeId) return functions if (!scopeId) return functions
let i = 0 let i = 0
// eslint-disable-next-line no-constant-condition
while (true) { while (true) {
i += 1 i += 1
if (i > 1000) throw new Error('retrieFunctionStack: recursion too deep') if (i > 1000) throw new Error('retrieFunctionStack: recursion too deep')

Loading…
Cancel
Save