3 ms·
JSHint[1] seems to be the most popular JS linter, although I believe Perl::Critic to be the more powerful of the two tools. I've always appreciated how Perl::C
by dharbin 13y ago
JSHint[1] seems to be the most popular JS linter, although I believe Perl::Critic to be the more powerful of the two tools. I've always appreciated how Perl::Critic allows you to write your own rules, and I wish JSHint was so customizable because I have coding standards I'd like to automate that don't exist in JSHint's options.
1: http://jshint.com/ http://jshint.com/
- lazyjones 13y ago> I believe Perl::Critic to be the more powerful of the two tools. It is quite limited by Perl's quirky syntax, unfortunately ("only Perl can parse Perl"). Last time I checked, it would miss e.g. all warnings for anonymous subs: # triggers "Subroutine "foo" does not end with "return" at line 5, column 1. See page 197 of PBP. (Severity: 4)" sub foo { my $s=shift; } # triggers no warnings my $x = sub { my $s=shift; } This is a bug/limitation in PPI (which otherwise does a great job with the mess that is Perl syntax) ... I'd assume the various JS analysers can do a more thorough job.