ts-strictify
ts-strictify copied to clipboard
ts-strictify says all files are passing when most if not all shoudln't
I'm working on an Ionic 4 / Angular 11 application and I want to help my team switch to strict mode.
I tried ts-strictify with the following command, on a feature branch with 8 changed TS files :
npx strictify --targetBranch feature/my-feature
It finds 8 changed files but the result is "All files passed". I'm sure none of those files should pass.
Is my command correct?
I'm working on a React & Typescript 3.8.0 simple project, on a windows machine.
The command npx ts-strictify --targetBranch feature.myBranch
recognizes the changed files properly, but everything passes.
This, for instance, passes:
const mockFunc = (param: number) => {
return param.toString();
};
mockFunc('string');
- this happens on windows on all ts versions, due to slashes mismatch while matching file paths,
- but it also happens on all OSes on typescript v4.4+, due to a bug where
ts-strictify
callstsc
with just--noEmit
flag.
Ref:
- https://github.com/cschroeter/ts-strictify/pull/31#issuecomment-952067456
- https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html#tsc---help-updates-and-improvements
- microsoft/TypeScript#44157