ts-strictify icon indicating copy to clipboard operation
ts-strictify copied to clipboard

ts-strictify says all files are passing when most if not all shoudln't

Open sebastienguillon opened this issue 3 years ago • 2 comments

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?

sebastienguillon avatar Mar 21 '21 00:03 sebastienguillon

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');

juliomrc avatar Mar 24 '21 21:03 juliomrc

  1. this happens on windows on all ts versions, due to slashes mismatch while matching file paths,
  2. but it also happens on all OSes on typescript v4.4+, due to a bug where ts-strictify calls tsc 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

falkenhawk avatar Oct 26 '21 16:10 falkenhawk