Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

xxx.d.ts files aren't being excluded #2856

Closed
winksaville opened this issue Jun 1, 2017 · 2 comments · Fixed by #2858
Closed

xxx.d.ts files aren't being excluded #2856

winksaville opened this issue Jun 1, 2017 · 2 comments · Fixed by #2858

Comments

@winksaville
Copy link

winksaville commented Jun 1, 2017

Bug Report

  • TSLint version: 5.4.1
  • TypeScript version: 2.3.4
  • Running TSLint via: (pick one) CLI

TypeScript code being linted

Linting Alsatian using npm run review-code which runs tslint:

$ tslint './**/*.ts' --exclude './**/*.d.ts' --exclude './test/**/*.ts' --exclude './node_modules/**/*.ts'

ERROR: cli/alsatian-cli-options.d.ts[3, 14]: The class property 'fileGlobs' must be marked either 'private', 'public', or 'protected'
ERROR: cli/alsatian-cli-options.d.ts[5, 14]: The class property 'timeout' must be marked either 'private', 'public', or 'protected'
ERROR: cli/alsatian-cli-options.d.ts[7, 14]: The class property 'tap' must be marked either 'private', 'public', or 'protected'
ERROR: cli/alsatian-cli-options.d.ts[9, 14]: The class property 'versionRequested' must be marked either 'private', 'public', or 'protected'
ERROR: cli/alsatian-cli-options.d.ts[11, 14]: The class property 'helpRequested' must be marked either 'priv

with tslint.json configuration:

$ cat tslint.json
{
  "extends": "tslint:recommended",
  "rules": {
     "array-type": [true, "generic"],
     "arrow-parens": false,
     "max-classes-per-file": false,
     "one-line": [ true, "check-open-brace", "check-whitespace"],
     "trailing-comma": false,
     "variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"],
     "ordered-imports": false,
     "object-literal-sort-keys": false
  },
  "jsRules": {
  },
  "rulesDirectory": [
  ]
}

Actual behavior

Errors are reported from *.d.ts files when using 5.4.1 but no errors are reported in 5.3.2:

Expected behavior

Should pass with 5.4.1

@winksaville
Copy link
Author

Here is the error I created on Alastain.

@adidahiya
Copy link
Contributor

duplicate of #2855

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants