jquery/jquery — pull request #1564 by benvinegar (2014-04-22 05:00:13+00:00)
Title: Build: reduce .jshintrc duplication using JSHint's "extends" option

JSHint has supported an "extends" option in .jshintrc files since 2.4.0:

https://github.com/jshint/jshint/commit/7f90f150de8862b68065c6796868662a83b74413#diff-d9d9214113dea1c364abd4ba3c70be11R324

I started using it in my own projects to remove duplicated rules between .jshintrc and test/.jshintrc, and noticed that jQuery could similarly benefit.

It does introduce a slightly confusing .jshintrc.dist → src/.jshintrc → .jshintrc dependency, however.

Running `grunt`:

```bash
± % grunt !8671
Running "jsonlint:pkg" (jsonlint) task
>> 1 file lint free.

Running "jsonlint:jscs" (jsonlint) task
>> 0 files lint free.

Running "jsonlint:bower" (jsonlint) task
>> 1 file lint free.

Running "build:all:*" (build) task
>> File 'dist/jquery.js' created.

Running "jshint:all" (jshint) task
>> 108 files lint free.

Running "jshint:dist" (jshint) task
>> 1 file lint free.

Running "jscs:src" (jscs) task
>> 78 files without code style errors.

Running "jscs:gruntfile" (jscs) task
>> 1 files without code style errors.

Running "jscs:test" (jscs) task
>> 2 files without code style errors.

Running "jscs:tasks" (jscs) task
>> 3 files without code style errors.

Running "uglify:all" (uglify) task
File dist/jquery.min.map created (source map).
File dist/jquery.min.js created.
Original: 247165 bytes.
Minified: 84253 bytes.

Running "dist:*" (dist) task

Running "compare_size:files" (compare_size) task
raw gz Sizes
247165 73260 dist/jquery.js
84253 29461 dist/jquery.min.js

raw gz Compared to master @ 90b43de21296cf59af7dd37c49c1a9a4f8483f68
= = dist/jquery.js
= = dist/jquery.min.js

raw gz Compared to last run
= = dist/jquery.js
= = dist/jquery.min.js

Saved as: jshintrc-extends

Done, without errors.
```