Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有 JavaScript 的代码标准/样式指南检查器?
基本上,相当于 PHP_CodeSniffer,但用于 JavaScript。
谷歌 JSLint,JSHint。不过,这些都有些主观,尤其是 JSLint。
就个人而言,我会推荐 JSHint,因为它是由社区维护的。它还具有用于代码验证的基于 node.js 的 CLI 工具。
有一个名为 的开源软件jscs,但没有使用它的经验:
jscs
https://github.com/mdevils/node-jscs
它提供 NPM (node.js) 和 Grunt 软件包供下载。