Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript Source Code Analyzer [closed]

Does anyone know of a good, extensible source code analyzer that examines JavaScript files?

like image 576
JamesEggers Avatar asked Dec 01 '08 16:12

JamesEggers


People also ask

Is JSHint static code analysis tool?

JSHint is a community-driven tool that detects errors and potential problems in JavaScript code. Since JSHint is so flexible, you can easily adjust it in the environment you expect your code to execute. JSHint is publicly available and will always stay this way.

Which linting tools can be considered for static analysis on JavaScript source code?

ESLint. ESLint is probably the most widely used static analysis tool for JavaScript today.

Which tool verifies syntax in JavaScript?

The two main know open source tools used for JavaScript code analysis are JSLint and JSHint, the second being a fork of the first one. Developed by the famous Douglas Crockford, JSLint can be considered as the main inspiration of the JavaScript open source code analysis tools family.


2 Answers

In the interest of keeping this question up-to-date, there is a fork of JSLint called JSHint. An explanation of why JSHint was created can be found here, but to summarize:

JSHint is a fork of JSLint, the tool written and maintained by Douglas Crockford. JSLint served me well for quite some time but in the past few months it has gotten uncomfortably opinionated and hostile towards your code. It is quickly transforming from a tool that helps developers to prevent bugs to a tool that makes sure you write your code like Douglas Crockford.

like image 57
CodeNaked Avatar answered Sep 19 '22 19:09

CodeNaked


JSLint has historically been the main tool for this, but several more now exist:

  • JSHint - a fork of JSLint that is said to be a little less opinionated
  • Closure Linter - a linter that checks against the Google Javascript Style Guide
  • ESLint - a more flexible tool, but newer, and not yet as stable.
like image 38
chills42 Avatar answered Sep 19 '22 19:09

chills42