search

Home  >  Q&A  >  body text

node.js 如何做代码静态检查?

如题,给位大神,给推荐个工具或者方法吧,最好附上检查的详细方法或者工具使用方法,谢谢了!

PHPzPHPz2863 days ago578

reply all(2)I'll reply

  • 阿神

    阿神2017-04-17 11:34:59

    There is a static code inspection tool, Facebook's Flow, and it has also been reported on infoq. See the documentation for specific usage.

    But currently only two versions are available: Linux and Mac OS.

    Source code is hosted on GITHUB

    To be honest, this tool is not yet mature and I have never used it. It feels like it will limit the flexibility of the code.

    There is a js code quality detection tool, jslint. Can be conveniently integrated with Gulp or Grunt.

    Using code inspection is not as good as directly using Typescript language tools like AtScript, js超集. Their compilers will accurately prompt error locations and modification suggestions.

    reply
    0
  • PHPz

    PHPz2017-04-17 11:34:59

    Welcome to the TypeScript family~ http://typescriptlang.com

    The tool can be used with Visual Studio 2013 Express/Community.

    reply
    0
  • Cancelreply