2 ms·
Very helpful in the JS world, but I am afraid there is not standalone standard for static checks in JS. There is typescript, but that's an entire new language
by baybal2 7y ago
Very helpful in the JS world, but I am afraid there is not standalone standard for static checks in JS.
There is typescript, but that's an entire new language to just partially cover the type checks.
- bcherny 7y agoIf you compile your code with TypeScript and set allowJs=true, you’ll get a lot of checking for free with no changes at all to your existing JS code. TS will catch things like dead code, missing return statements, type mismatches and so on for free.
- baybal2 7y agoIt will be nice if the use case of TS only being used as a static checker be supported better, but then there will be no point in TS as a language
- xenorplxx 7y agoalternative to typescript would be facebook's flow.js, which works with 'normal' JS code
- tru3_power 7y agoFortify SCA supports js and typescript. I’ve been writing custom rules for it lately at work and have had great success with it. Expensive but powerful tool.