attorest/atto-rest

View on GitHub

Showing 82 of 82 total issues

object access via string literals is disallowed
Open

        [Action.READ]: [200, {  ...model, id: input['id'], name: `Chat #${input['id']}` }],
Severity: Minor
Found in src/routes/chats.ts by tslint

Rule: no-string-literal

Forbids unnecessary string literal property access. Allows obj["prop-erty"] (can't be a regular property access). Disallows obj["property"] (should be obj.property).

Rationale

If --noImplicitAny is turned off, property access via a string literal will be 'any' if the property does not exist.

Notes
  • Has Fix

Config

Not configurable.

Examples
"no-string-literal": true

For more information see this page.

Unnecessary 'await'.
Open

    return await response({
Severity: Minor
Found in src/routes/index.ts by tslint

Rule: no-return-await

Disallows unnecessary return await.

Rationale

An async function always wraps the return value in a Promise. Using return await just adds extra time before the overreaching promise is resolved without changing the semantics.

Notes
  • Has Fix

Config

Not configurable.

Examples
"no-return-await": true

For more information see this page.

Severity
Category
Status
Source
Language