JamieMagee/hashflags-node

View on GitHub

Showing 53 of 53 total issues

expected arrow-call-signature to have a typedef
Open

      .then((response: AxiosResponse<HashflagsJson>) => {
Severity: Minor
Found in src/Hashflags.ts by tslint

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.

When chaining calls, put method calls on new lines.
Open

    hashflags = await Hashflags.FETCH().then((val: Map<string, string>) => {
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    expect(hashflags.extractHashflagsWithIndices(tweet)).toHaveLength(2);
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    ).filter(
Severity: Minor
Found in src/Hashflags.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    expect(hashflags.getUrl('#olympictorchrelay')).toEqual(olympicTorchURL);
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

expected arrow-call-signature to have a typedef
Open

  it('Should return correct HTML all hashflags in a tweet', () => {
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

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.

When chaining calls, put method calls on new lines.
Open

    expect(hashflags.isValidHashflag('#olympictorchrelay')).toBeTruthy();
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

Module 'axios-mock-adapter' is not listed as dependency in package.json
Open

import * as MockAdapter from 'axios-mock-adapter';
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

Rule: no-implicit-dependencies

Disallows importing modules that are not listed as dependency in the project's package.json

Disallows importing transient dependencies and modules installed above your package's root directory.

Config

By default the rule looks at "dependencies" and "peerDependencies". By adding the "dev" option the rule also looks at "devDependencies". By adding the "optional" option the rule also looks at "optionalDependencies". An array of whitelisted modules can be added to skip checking their existence in package.json.

Examples
"no-implicit-dependencies": true
"no-implicit-dependencies": true,dev
"no-implicit-dependencies": true,optional
"no-implicit-dependencies": true,src,app
Schema
{
  "type": "array",
  "items": [
    {
      "type": "string",
      "enum": [
        "dev",
        "optional"
      ]
    },
    {
      "type": "array"
    }
  ],
  "minItems": 0,
  "maxItems": 3
}

For more information see this page.

When chaining calls, put method calls on new lines.
Open

    expect(hashflags.isValidHashflag('#love')).not.toBeTruthy();
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

Rule: newline-per-chained-call

Requires that chained method calls be broken apart onto separate lines.

Rationale

This style helps to keep code 'vertical', avoiding the need for side-scrolling in IDEs or text editors.

Config

Not configurable

For more information see this page.

Imported module is being loaded from a relative path. Please use an absolute path: import { Hashflags, HashflagWithIndices } from '../src/Hashflags';
Open

import { Hashflags, HashflagWithIndices } from '../src/Hashflags';
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

Rule: no-relative-imports

Do not use relative paths when importing external modules or ES6 import declarations

Config

One argument may be optionally provided:

' + '* allow-siblings allows relative imports for files in the same or nested folders.

Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "allow-siblings"
    ]
  },
  "minLength": 0,
  "maxLength": 1
}

For more information see this page.

expected arrow-call-signature to have a typedef
Open

    hashtags.forEach((value: HashtagWithIndices) => {
Severity: Minor
Found in src/Hashflags.ts by tslint

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 arrow-call-signature to have a typedef
Open

    hashflags = await Hashflags.FETCH().then((val: Map<string, string>) => {
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

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 arrow-call-signature to have a typedef
Open

  it('Should get hashflags without indices', () => {
Severity: Minor
Found in __tests__/Hashflags-spec.ts by tslint

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.

Severity
Category
Status
Source
Language