Created
December 20, 2016 09:11
-
-
Save joseph-allen/3211b0c25a5c97e7027c91fcd8e26bc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview Rule to flag use of _.cloneDeep | |
* @author Joseph Allen | |
*/ | |
//------------------------------------------------------------------------------ | |
// Rule Definition | |
//------------------------------------------------------------------------------ | |
module.exports = function(context) { | |
return { | |
'MemberExpression': function(node) { | |
if (node.object.name === '_' && node.property.name === 'cloneDeep') { | |
context.report(node, 'Moonstick won\'t use ' + node.object.name + node.property.name); | |
} | |
} | |
}; | |
}; | |
module.exports.schema = []; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment