const age = myCollection.find(x => x.name === targetName).age;
the file does not have a // @ts-strict-ignore comment in it.
My IDE correctly flags the issue as Object possibly undefined. when I build, it does not create an error, and the linter passes as well.
I want to prevent a file like this from being commited using a git commit hook. Currerenty our hook runs eslint via lint-staged but I wonder if it could run tsc-strict just on the staged files?
I have the following in my ts config file:
I have a TS file with the following:
the file does not have a
// @ts-strict-ignore
comment in it.My IDE correctly flags the issue as
Object possibly undefined
. when I build, it does not create an error, and the linter passes as well.I want to prevent a file like this from being commited using a git commit hook. Currerenty our hook runs eslint via lint-staged but I wonder if it could run
tsc-strict
just on the staged files?