Skip to content

[typescript-angular] Disable tslint in generated files /* tslint:disable */ #6720

@etrich

Description

@etrich
Description

The generated TS code disables only specific tslint rules:

/* tslint:disable:no-unused-variable member-ordering */

Some other generated files do not disable any tslint rules.

The generated code is causing tslint issues depending on configured rules, such as:

  • " should be '
  • file should end with a newline
  • trailing whitespace
  • Missing semicolon
    etc.
Swagger-codegen version

2.3.0 - swagger-codegen-cli-2.3.0-20171004.083430-178

Steps to reproduce
  • tslint.json:
    "semicolon": [ true, "always" ],
  • generate an api client
  • Run ng lint
Suggest a fix/enhancement

Simple fix would be to disable all tslint rules in generated files:

/* tslint:disable */

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions