X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=eslint%2Ftests%2Ffixtures%2Frules%2Fcustom-rule.js;h=8b1cce10dbc36d8df517691342084343616be977;hb=f2a92ac62f5c8e72451bd86e77e46c05e75cf42e;hp=6d8b662ba398e680d0a67fe96f2661d22657cfa1;hpb=28ff354db001e368c2497fb14373081a5dfad2fd;p=pve-eslint.git diff --git a/eslint/tests/fixtures/rules/custom-rule.js b/eslint/tests/fixtures/rules/custom-rule.js index 6d8b662..8b1cce1 100644 --- a/eslint/tests/fixtures/rules/custom-rule.js +++ b/eslint/tests/fixtures/rules/custom-rule.js @@ -1,15 +1,17 @@ -module.exports = function(context) { +module.exports = { + meta: { + schema: [] + }, + create(context) { - "use strict"; + "use strict"; - return { - "Identifier": function(node) { - if (node.name === "foo") { - context.report(node, "Identifier cannot be named 'foo'."); + return { + "Identifier": function(node) { + if (node.name === "foo") { + context.report(node, "Identifier cannot be named 'foo'."); + } } - } - }; - + }; + } }; - -module.exports.schema = [];