javascriptjslintpratt-parser

How does jslint work?


How does jslint check for problems in javascript? Does it have an actual javascript parser?


Solution

  • JSLint is written in JavaScript and uses a Pratt Parser. It "works" by parsing the source provided and looks for "problems". These problems are defined by the author, and are not necessarily syntax-related.

    It should be noted that "JSLint defines a professional subset of JavaScript". This means that not all pure ECMAScript would appear valid in JSLint.