retracedhq/monkit

View on GitHub
src/metrics.ts

Summary

Maintainability
A
0 mins
Test Coverage

Don't use 'Function' as a type. Avoid using the Function type. Prefer a specific function type, like () => void.
Open

  delegate: Function,
Severity: Minor
Found in src/metrics.ts by tslint

Rule: ban-types

Bans specific types from being used. Does not ban the corresponding runtime objects from being used.

Notes
  • TypeScript Only

Config

A list of ["regex", "optional explanation here"], which bans types that match regex

Examples
"ban-types": true,Object,Use {} instead.,String
Schema
{
  "type": "list",
  "listType": {
    "type": "array",
    "items": {
      "type": "string"
    },
    "minLength": 1,
    "maxLength": 2
  }
}

For more information see this page.

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

    let originalMethod = descriptor.value;
Severity: Minor
Found in src/metrics.ts by tslint

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