Skip to content

Commit

Permalink
[[FIX]] Prevent regression in enforceall
Browse files Browse the repository at this point in the history
Ensure that a recent change to option organization does not effect the
behavior of the `enforceall` option. Update the documentation to more
accurately describe the behavior of `enforceall`.
  • Loading branch information
jugglinmike committed May 31, 2015
1 parent e47168f commit 6afcde4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,14 @@ exports.bool = {
varstmt: false,

/**
* This option is a short hand for the most strict JSHint configuration. It
* enables all enforcing options and disables all relaxing options.
* This option is a short hand for the most strict JSHint configuration as
* available in JSHint version 2.6.3. It enables all enforcing options and
* disables all relaxing options that were defined in that release.
*
* @deprecated The option automatically opts users in to new features which
* can lead to unexpected warnings/errors in when upgrading
* between minor versions of JSHint.
* @deprecated The option cannot be maintained without automatically opting
* users in to new features. This can lead to unexpected
* warnings/errors in when upgrading between minor versions of
* JSHint.
*/
enforceall : false
},
Expand Down Expand Up @@ -965,5 +967,6 @@ exports.removed = {
// Add options here which should not be automatically enforced by
// `enforceall`.
exports.noenforceall = {
varstmt: true
varstmt: true,
strict: true
};
8 changes: 7 additions & 1 deletion tests/unit/fixtures/enforceall.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
var someVar = obj[ "key" ] || 0
var someVar = obj[ "key" ] || 0

function f() {
function g() {

}
}

0 comments on commit 6afcde4

Please sign in to comment.