Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does jslint work?

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

like image 839
Kyle Avatar asked Jan 01 '26 01:01

Kyle


1 Answers

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.

like image 87
Zack The Human Avatar answered Jan 02 '26 14:01

Zack The Human



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!