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

File pass when i have strict mode errors

Open mpanichella opened this issue 5 years ago • 2 comments

Hi, i try to use this extension, I use npx ts-strictify --targetBranch development but when execute, found 1 file that its changed, and say:

$ npx ts-strictify --targetBranch development � Found 1 changed file ✅ C:\TeamProjects\components\home\components \use\use.component.ts passed � All files passed

But, i have errors in this files.

mpanichella avatar Jul 03 '20 18:07 mpanichella

Additional data, i found that the problem is in ts-strictify.js the problem tha i see is in windows, because the difference with \ and /

tsc error is for example folder/file/test.ts but path_1.relative return folder\file\test.ts so the line.includes(path_1.relative............. never work.

I change the code and replace this line

if (line.includes(path_1.relative(process.cwd(), fileName))) {

for this

if (line.includes(path_1.relative(process.cwd(), fileName).split('\').join('/'))) {

and work well...... horrible patch... but work....

mpanichella avatar Jul 03 '20 20:07 mpanichella

Mhh thats unfortunate - looks like the tsc should output the paths incorrectly - let me see if i can do sth

cschroeter avatar Jul 12 '20 19:07 cschroeter