Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291123

Update JSHint configuration

$
0
0

A new version of JSHint is out: http://www.jshint.com/blog/2013-03-05/1-1-0/ and http://www.jshint.com/blog/2013-05-07/2-0-0/ it introduces a few nice options.

I'd like to add the following:

  1. "unused": "vars": This would show something fishy going on in the code, uneeded parameters are too many in core and don't highlight potential problems the same way unused vars do.
  2. "strict": true: We're using strict mode everywhere, this can enforce it.
  3. Remove "expr": true: Not sure why it's in there to begin with.

In jshintignore added

core/misc/jquery.ui.touch-punch.js
core/misc/domready

That would make .jshintrc like this:

{
  "browser"   : true,
  "curly"     : true,
  "eqeqeq"    : true,
  "forin"     : true,
  "latedef"   : true,
  "newcap"    : true,
  "noarg"     : true,
  "strict"    : true,
  "trailing"  : true,
  "undef"     : true,
  "unused"    : "vars",
  "predef"    : [
    "Drupal",
    "drupalSettings",
    "domready",
    "jQuery",
    "_",
    "matchMedia",
    "Backbone",
    "Modernizr",
    "VIE",
    "CKEDITOR"
  ]
}
AttachmentSizeStatusTest resultOperations
core-jshint-config-update.patch889 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 55,754 pass(es).View details | Re-test

Viewing all articles
Browse latest Browse all 291123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>