Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Extend option overwrites options in the wrong direction #1439

Closed
mikesherov opened this Issue · 1 comment

2 participants

@mikesherov
Collaborator

given the following configuration:

b.jshintrc

{
    maxlen: 10
}

a.jshintrc

{
    extend: 'b.jshintrc',
    maxlen: 20
}

produces maxlen:10 in a.jshintrc. This is because the arguments to _.extend are backwards here:

_.extend(config, exports.loadConfig(path.resolve(config.dirname, config['extends'])));

As the underscore docs say in http://underscorejs.org/#extend:

extend_.extend(destination, *sources)
Copy all of the properties in the source objects over to the destination object, and return the destination object. It's in-order, so the last source will override properties of the same name in previous arguments.

@mzgol mzgol referenced this issue in jquery/jquery
Closed

Build: Use jsHint extends option #1471

@dimitrisuls dimitrisuls referenced this issue from a commit in dimitrisuls/Ramble
@dimitrisuls dimitrisuls Temporarily hack jshintrc to satisfy JSHint-errors due to bug in new …
…JSHint "extends" option:


jshint/jshint#1439

Update Gruntfile.js to compile all less-files separetly so csslint can lint them properly.
4451756
@valueof valueof referenced this issue from a commit
@mikesherov mikesherov Issue #1439: Make extend option to overwrite in the right direction
Signed-off-by: Anton Kovalyov <anton@kovalyov.net>
5f75b2c
@valueof valueof referenced this issue from a commit
@mikesherov mikesherov Issue #1439: Make extend option to overwrite in the right direction
Signed-off-by: Anton Kovalyov <anton@kovalyov.net>
16c435c
@valueof
Owner

Fixed both in 2.x and master.

@valueof valueof closed this
@jugglinmike jugglinmike referenced this issue from a commit in jugglinmike/jshint
@mikesherov mikesherov Issue #1439: Make extend option to overwrite in the right direction
Signed-off-by: Anton Kovalyov <anton@kovalyov.net>
c7d5547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.