plantain-00 / type-coverage

A CLI tool to check type coverage for typescript code
MIT License
1.25k stars 44 forks source link

Type-coverage can't read folders ? #2

Open julestruong opened 6 years ago

julestruong commented 6 years ago

Version(if relevant): 1.0.10

Environment(if relevant):

Node v9.8.0

Code(if relevant):

My TS config

{
  "compilerOptions": {
    "target": "ES2015",
    "module": "commonjs",
    "noImplicitAny": true,
    "strictNullChecks": true,
    "removeComments": true,
    "skipLibCheck": true,
    "preserveConstEnums": true,
    "sourceMap": true,
    "moduleResolution": "node",
    "outDir": "dist"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules", "Typings"]
}

Expected:

Working

Actual:

ENOENT: no such file or directory, stat 'src/**/*.ts'

plantain-00 commented 6 years ago

v1.0.11 should fix this

prayerslayer commented 6 years ago

Hi, thanks for this project! I have the following issue, which is related but not 100% the same.

My folder layout looks like this:

.
├── Dockerfile
├── config
│   ├── postcss.config.js
│   ├── stylelint.config.js
│   ├── tsconfig.json
│   ├── webpack-dev-server.js
│   ├── webpack.config.js
│   ├── webpack.local.config.js
│   └── webpack.prod.config.js
├── package.json
├── src
│   ├── images
│   ├── js
│   └── scss
├── test
│   └── js
└── yarn.lock

And in my tsconfig I have:

{
  "include": [
    "../src"
  ]
}

Which leads to:

> type-coverage --project config/tsconfig.json --at-least 80

0 / 0 NaN%
type-coverage success.

I can fix it and submit a PR if you want?

plantain-00 commented 6 years ago

PR is always welcome. It's a simple bug, I just released v1.0.12, it should fix this

prayerslayer commented 6 years ago

Works perfectly, thank you for the fast response 👌