It is provided primarily as a browser-based web application accessible through the domain jslint.com, but there are also command-line adaptations. JSLint is strict and not configurable, whereas JSHint is lacking the extension mechanism. Code that was perfectly fine yesterday is now throwing an error today. JSX is a syntax extension to JavaScript that’s used by the React UI library. Every developer likes to write code a little differently. npm install jshint If you are using nvm and zsh , ensure that the line to load nvm is in .zshenv or .zprofile and not .zshrc . The other major shortcoming for JSHint is that it doesn’t provide nearly as many output options. In my experience, the healthiest software teams I’ve worked on settle on a list of rules for code that they enforce across the entire code base. JSHint 和 JSLint 都是用于帮助开发者侦测 JavaScript 代码的错误和潜在问题的静态代码分析工具。不少开发者一开始接触这类工具会被两者混淆,本文试图清晰地解释两者的 This avoids the frustration you see in the initial setup process. The extension looks for a jshint module in the current directory and in the global package location. JSLint vs JSHint Luke Page In January of this year Douglas Crockford decided that some of the options in JSLint were generally accepted and should always be on. However, ESLint comes packaged with an initialization script that simplifies this process. While both will explain to you how to use their system if you read them, JSHint’s documentation is simpler and more straightforward. While this is useful, it doesn’t compare to the clarity provided by ESLint. This website uses cookies to improve your experience while you navigate through the website. We and selected partners, use cookies or similar technologies to provide our services, to personalize content and ads, to provide social media features and to analyze our traffic, both on this website and through other media, as further detailed in our. They can also provide a small snippet of the code with a carat to indicate where the error triggered during evaluation. ESLint makes it clear what problems it has with my code, and it’s easier to set up. It will lint JavaScript in files with the .js extension and optionally inside