Blame view
node_modules/eslint/lib/rules/no-var.js
629 Bytes
c39994410
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
/** * @fileoverview Rule to check for the usage of var. * @author Jamund Ferguson * @copyright 2014 Jamund Ferguson. All rights reserved. */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { return { "VariableDeclaration": function(node) { if (node.kind === "var") { context.report(node, "Unexpected var, use let or const instead."); } } }; }; module.exports.schema = []; |