UNPKG

eslint-plugin-better

Version:

Avoid some language features to write better code

9 lines 249 B
module.exports = function(context) { return { 'VariableDeclaration': function (node) { return ['var', 'let'].indexOf(node.kind) !== -1 ? context.report(node, 'Unexpected variable declaration, use const instead') : undefined; } }; };