News for hackers. Stuff that matters.
Re:Disable comments make static analysis tools worse by aluminum96 on Tuesday July 06, 2021 @12:10AM (#27744159)
There are always reasons to use the escape hatch. For example, I recently needed to cast to a known type and access a property, but didn't want to reference that type directly, so as to retain the ability to tree shake it. This requires asserting that the property exists, and turning off eslint for that line.
Re:Disable comments make static analysis tools worse by atom_arranger on Tuesday July 06, 2021 @01:06AM (#27744420)
You could use a type only import for the type, gets taken out completely when compiled, so no tree shaking issue.

https://www.typescriptlang.org/docs/handbook/release-notes/t...