Ignore file doesn't work for root matching
konsalex opened this issue · 5 comments
Version(if relevant): 1.0.0
2.18.8
Environment(if relevant):
Typescript v4.3.5
Node 12.14.1
Code(if relevant):
typescript-coverage-report --ignore-files '*.js' --ignore-files 'src/**/*.js' --ignore-files 'src/**/*.jsx' --threshold=98
Expected:
To ignore all js files, even on the root dir.
Actual:
tailwind.config.js
I think should be ignored from *.js
, but this is not the case. Any clue why this is happening?
Update, when I use the package.json
approach of ignoring files it works properly 🤔
You can add a log here (./node_modules/type-coverage/dist/index.js https://github.com/plantain-00/type-coverage/blob/master/packages/cli/src/index.ts#L204 ) to see whether ignoreFiles
is correct.
They are indeed logged [ '*.js', 'src/**/*.js', 'src/**/*.jsx' ]
and removed from type-coverage
but not from typescript-coverage-report
.
Weird
I cannot reproduce it, more information is required.
if yarn type-coverage --ignore-files '*.js' --ignore-files 'src/**/*.js' --ignore-files 'src/**/*.jsx' --detail
works but typescript-coverage-report --ignore-files '*.js' --ignore-files 'src/**/*.js' --ignore-files 'src/**/*.jsx'
not work, maybe it's typescript-coverage-report
's bug.
I will issue this later to typescript-coverage-report