Tslint: `complete-docs` on type member

Created on 18 Dec 2018  ยท  3Comments  ยท  Source: palantir/tslint

Bug Report

  • __TSLint version__: 5.12.0
  • __TypeScript version__: 3.2.2
  • __Running TSLint via__: CLI

TypeScript code being linted

class Foo {
  private someField?: { bar(): void };
}

with tslint.json configuration:

    "completed-docs": [
      true,
      {
        "classes": true,
        "enums": true,
        "functions": {
          "visibilities": [
            "exported"
          ]
        },
        "methods": {
          "privacies": [
            "public"
          ]
        },
        "interfaces": true,
        "namespaces": true
      }
    ],

Actual behavior

Documentation must exist for methods.

on the bar function.

Expected behavior

The type is not an interface but a type. I don't expect tslint to complain about it.

Bug Rule Enhancement ๐ŸŒน R.I.P. ๐ŸŒน

Most helpful comment

@buu700 mentioned in #4398:

Edit: Adding "locations": "all" to "methods" and "properties" fixed this. Is this expected?

I don't think so?

All 3 comments

@buu700 mentioned in #4398:

Edit: Adding "locations": "all" to "methods" and "properties" fixed this. Is this expected?

I don't think so?

๐Ÿ’€ _It's time!_ ๐Ÿ’€

TSLint is deprecated and no longer accepting pull requests other than security fixes. See #4534. โ˜ ๏ธ
We recommend you instead use typescript-eslint to lint your TypeScript code with ESLint. โœ…

๐Ÿ‘‹ It was a pleasure open sourcing with you!

๐Ÿค– Beep boop! ๐Ÿ‘‰ TSLint is deprecated ๐Ÿ‘ˆ _(#4534)_ and you should switch to typescript-eslint! ๐Ÿค–

๐Ÿ”’ This issue is being locked to prevent further unnecessary discussions. Thank you! ๐Ÿ‘‹

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zewa666 picture zewa666  ยท  3Comments

rajinder-yadav picture rajinder-yadav  ยท  3Comments

CSchulz picture CSchulz  ยท  3Comments

cateyes99 picture cateyes99  ยท  3Comments

cretz picture cretz  ยท  3Comments