33var Checker = require ( "jscs" ) ,
44 jscsConfig = require ( "jscs/lib/cli-config" ) ,
55
6- assign = require ( "lodash" ) . assign ,
6+ _ = require ( "lodash" ) ,
77 hooker = require ( "hooker" ) ;
88
99exports . init = function ( grunt ) {
1010
1111 // Task specific options
1212 var taskOptions = [ "config" , "force" , "reporter" , "reporterOutput" ] ;
1313
14- /**
15- * @see jQuery.isEmptyObject
16- * @private
17- */
18- function isEmptyObject ( obj ) {
19- var name ;
20-
21- for ( name in obj ) {
22- return false ;
23- }
24-
25- return true ;
26- }
27-
2814 /**
2915 * Default reporter
3016 * @private
@@ -81,11 +67,11 @@ exports.init = function( grunt ) {
8167
8268 // If the config option is null, but we have inline options,
8369 // we'll only use them as our config.
84- if ( configOption == null && ! isEmptyObject ( options ) ) {
70+ if ( configOption == null && ! _ . isEmpty ( options ) ) {
8571 config = options ;
8672
8773 } else {
88- assign ( config , options ) ;
74+ _ . assign ( config , options ) ;
8975 }
9076
9177 this . throwForConfig ( config ) ;
@@ -100,7 +86,7 @@ exports.init = function( grunt ) {
10086 JSCS . prototype . throwForConfig = function ( config ) {
10187 var configOption = this . options . config ;
10288
103- if ( isEmptyObject ( config ) ) {
89+ if ( _ . isEmpty ( config ) ) {
10490 if ( configOption && typeof configOption === "string" ) {
10591 if ( grunt . file . exists ( configOption ) ) {
10692 grunt . fatal ( "\"" + configOption + "\" config is empty" ) ;
0 commit comments