UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

15 lines (13 loc) 300 B
/** * Rule: avoid-new * Avoid creating new promises outside of utility libraries. */ module.exports = function (context) { return { NewExpression: function (node) { if (node.callee.name === 'Promise') { context.report(node, 'Avoid creating new promises.') } } } }