tkqubo/conditional-decorator

View on GitHub
test/conditional-as-method-decorator.spec.ts

Summary

Maintainability
F
5 days
Test Coverage

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    describe(
      '(test: (target?: Object, key?: string|symbol, desc?: PropertyDescriptor) => boolean, decorator: MethodDecorator): MethodDecorator',
      () => {
        it('decorates if test function returns true', () => {
          assert(applicationSpy3.callCount === 1);
Severity: Major
Found in test/conditional-as-method-decorator.spec.ts and 1 other location - About 2 days to fix
test/conditional-as-method-decorator.spec.ts on lines 150..179

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 452.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      describe('for ordinary method', () => {
        it('decorates if test is truthy', () => {
          assert(applicationSpy1.callCount === 1);
          assert(applicationSpy1.getCall(0).args[0] === TargetClass.prototype);
          assert(applicationSpy1.getCall(0).args[1] === 'method1');
Severity: Major
Found in test/conditional-as-method-decorator.spec.ts and 1 other location - About 2 days to fix
test/conditional-as-method-decorator.spec.ts on lines 243..274

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 452.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

expected variable-declaration: 'invocationSpy1' to have a typedef
Open

const invocationSpy1 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'applicationSpy3' to have a typedef
Open

const applicationSpy3 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'instanceMethodSpy4' to have a typedef
Open

const instanceMethodSpy4 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'instanceMethodSpy7' to have a typedef
Open

const instanceMethodSpy7 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

Use 'undefined' instead of 'null'
Open

      return null;

Rule: no-null-keyword

Disallows use of the null keyword literal.

Rationale

Instead of having the dual concepts of null andundefined in a codebase, this rule ensures that only undefined is used.

JavaScript originally intended undefined to refer to a value that doesn't yet exist, while null was meant to refer to a value that does exist but points to nothing. That's confusing. undefined is the default value when object members don't exist, and is the return value for newer native collection APIs such as Map.get when collection values don't exist.

const myObject = {};
myObject.doesNotExist; // undefined
const myMap = new Map<string number>();
myMap.get("doesNotExist"); // undefined</string>

To remove confusion over the two similar values, it's better to stick with just undefined.

Notes
  • Has Fix

Config

Not configurable.

Examples
"no-null-keyword": true

For more information see this page.

expected variable-declaration: 'instanceMethodSpy1' to have a typedef
Open

const instanceMethodSpy1 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'decor1' to have a typedef
Open

const decor1 = createSideEffectMethodDecorator(applicationSpy1, invocationSpy1, PropertyType.Value);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'applicationSpy5' to have a typedef
Open

const applicationSpy5 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'invocationSpy6' to have a typedef
Open

const invocationSpy6 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

The class method 'decoratableMethod' must be marked either 'private', 'public', or 'protected'
Open

  decoratableMethod(name: string) {

Rule: member-access

Requires explicit visibility declarations for class members.

Rationale

Explicit visibility declarations can make code more readable and accessible for those new to TS.

Other languages such as C# default to private, unlike TypeScript's default of public. Members lacking a visibility declaration may be an indication of an accidental leak of class internals.

Notes
  • TypeScript Only
  • Has Fix

Config

These arguments may be optionally provided:

  • "no-public" forbids public accessibility to be specified, because this is the default.
  • "check-accessor" enforces explicit visibility on get/set accessors
  • "check-constructor" enforces explicit visibility on constructors
  • "check-parameter-property" enforces explicit visibility on parameter properties
Examples
"member-access": true
"member-access": true,no-public
"member-access": true,check-accessor
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "no-public",
      "check-accessor",
      "check-constructor",
      "check-parameter-property"
    ]
  },
  "minLength": 0,
  "maxLength": 4
}

For more information see this page.

expected variable-declaration: 'instanceMethodSpy2' to have a typedef
Open

const instanceMethodSpy2 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected call-signature: 'method1' to have a typedef
Open

  method1(name: string) {

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'decor2' to have a typedef
Open

const decor2 = createSideEffectMethodDecorator(applicationSpy2, invocationSpy2, PropertyType.Value);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'applicationSpy2' to have a typedef
Open

const applicationSpy2 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'invocationSpy3' to have a typedef
Open

const invocationSpy3 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'invocationSpy4' to have a typedef
Open

const invocationSpy4 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'instanceMethodSpy5' to have a typedef
Open

const instanceMethodSpy5 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'applicationSpy8' to have a typedef
Open

const applicationSpy8 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'decor8' to have a typedef
Open

const decor8 = createSideEffectMethodDecorator(applicationSpy8, invocationSpy8, PropertyType.Set);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'applicationSpy1' to have a typedef
Open

const applicationSpy1 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'invocationSpy5' to have a typedef
Open

const invocationSpy5 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected call-signature: 'method2' to have a typedef
Open

  method2(name: string) {

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'age' to have a typedef
Open

          let age = new TargetClass().age;

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

The class method 'method1' must be marked either 'private', 'public', or 'protected'
Open

  method1(name: string) {

Rule: member-access

Requires explicit visibility declarations for class members.

Rationale

Explicit visibility declarations can make code more readable and accessible for those new to TS.

Other languages such as C# default to private, unlike TypeScript's default of public. Members lacking a visibility declaration may be an indication of an accidental leak of class internals.

Notes
  • TypeScript Only
  • Has Fix

Config

These arguments may be optionally provided:

  • "no-public" forbids public accessibility to be specified, because this is the default.
  • "check-accessor" enforces explicit visibility on get/set accessors
  • "check-constructor" enforces explicit visibility on constructors
  • "check-parameter-property" enforces explicit visibility on parameter properties
Examples
"member-access": true
"member-access": true,no-public
"member-access": true,check-accessor
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "no-public",
      "check-accessor",
      "check-constructor",
      "check-parameter-property"
    ]
  },
  "minLength": 0,
  "maxLength": 4
}

For more information see this page.

expected variable-declaration: 'decor3' to have a typedef
Open

const decor3 = createSideEffectMethodDecorator(applicationSpy3, invocationSpy3, PropertyType.Value);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected call-signature: 'undecoratableMethod' to have a typedef
Open

  undecoratableMethod(name: string) {

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'sex' to have a typedef
Open

          let sex = new TargetClass().sex;

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

The class method 'method2' must be marked either 'private', 'public', or 'protected'
Open

  method2(name: string) {

Rule: member-access

Requires explicit visibility declarations for class members.

Rationale

Explicit visibility declarations can make code more readable and accessible for those new to TS.

Other languages such as C# default to private, unlike TypeScript's default of public. Members lacking a visibility declaration may be an indication of an accidental leak of class internals.

Notes
  • TypeScript Only
  • Has Fix

Config

These arguments may be optionally provided:

  • "no-public" forbids public accessibility to be specified, because this is the default.
  • "check-accessor" enforces explicit visibility on get/set accessors
  • "check-constructor" enforces explicit visibility on constructors
  • "check-parameter-property" enforces explicit visibility on parameter properties
Examples
"member-access": true
"member-access": true,no-public
"member-access": true,check-accessor
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "no-public",
      "check-accessor",
      "check-constructor",
      "check-parameter-property"
    ]
  },
  "minLength": 0,
  "maxLength": 4
}

For more information see this page.

expected variable-declaration: 'instanceMethodSpy6' to have a typedef
Open

const instanceMethodSpy6 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'applicationSpy7' to have a typedef
Open

const applicationSpy7 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'invocationSpy7' to have a typedef
Open

const invocationSpy7 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'instanceMethodSpy8' to have a typedef
Open

const instanceMethodSpy8 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'invocationSpy2' to have a typedef
Open

const invocationSpy2 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'applicationSpy4' to have a typedef
Open

const applicationSpy4 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'invocationSpy8' to have a typedef
Open

const invocationSpy8 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

The class method 'undecoratableMethod' must be marked either 'private', 'public', or 'protected'
Open

  undecoratableMethod(name: string) {

Rule: member-access

Requires explicit visibility declarations for class members.

Rationale

Explicit visibility declarations can make code more readable and accessible for those new to TS.

Other languages such as C# default to private, unlike TypeScript's default of public. Members lacking a visibility declaration may be an indication of an accidental leak of class internals.

Notes
  • TypeScript Only
  • Has Fix

Config

These arguments may be optionally provided:

  • "no-public" forbids public accessibility to be specified, because this is the default.
  • "check-accessor" enforces explicit visibility on get/set accessors
  • "check-constructor" enforces explicit visibility on constructors
  • "check-parameter-property" enforces explicit visibility on parameter properties
Examples
"member-access": true
"member-access": true,no-public
"member-access": true,check-accessor
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "no-public",
      "check-accessor",
      "check-constructor",
      "check-parameter-property"
    ]
  },
  "minLength": 0,
  "maxLength": 4
}

For more information see this page.

expected variable-declaration: 'decor5' to have a typedef
Open

const decor5 = createSideEffectMethodDecorator(applicationSpy5, invocationSpy5, PropertyType.Get);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'decor6' to have a typedef
Open

const decor6 = createSideEffectMethodDecorator(applicationSpy6, invocationSpy6, PropertyType.Get);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'decor7' to have a typedef
Open

const decor7 = createSideEffectMethodDecorator(applicationSpy7, invocationSpy7, PropertyType.Set);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'applicationSpy6' to have a typedef
Open

const applicationSpy6 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'decoratee' to have a typedef
Open

    let decoratee = getDecoratee(type, descriptor);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'instanceMethodSpy3' to have a typedef
Open

const instanceMethodSpy3 = sinon.spy();

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected variable-declaration: 'decor4' to have a typedef
Open

const decor4 = createSideEffectMethodDecorator(applicationSpy4, invocationSpy4, PropertyType.Value);

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

expected call-signature: 'decoratableMethod' to have a typedef
Open

  decoratableMethod(name: string) {

Rule: typedef

Requires type definitions to exist.

Notes
  • TypeScript Only

Config

Several arguments may be optionally provided:

  • "call-signature" checks return type of functions.
  • "arrow-call-signature" checks return type of arrow functions.
  • "parameter" checks type specifier of function parameters for non-arrow functions.
  • "arrow-parameter" checks type specifier of function parameters for arrow functions.
  • "property-declaration" checks return types of interface properties.
  • "variable-declaration" checks non-binding variable declarations.
  • "variable-declaration-ignore-function" ignore variable declarations for non-arrow and arrow functions.
  • "member-variable-declaration" checks member variable declarations.
  • "object-destructuring" checks object destructuring declarations.
  • "array-destructuring" checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "call-signature",
      "arrow-call-signature",
      "parameter",
      "arrow-parameter",
      "property-declaration",
      "variable-declaration",
      "variable-declaration-ignore-function",
      "member-variable-declaration",
      "object-destructuring",
      "array-destructuring"
    ]
  },
  "minLength": 0,
  "maxLength": 10
}

For more information see this page.

There are no issues that match your filters.

Category
Status