From 5aa2fe0712b9cc927bea2263a00e1a0dfab03bdb Mon Sep 17 00:00:00 2001 From: Joachim Seminck Date: Wed, 24 May 2017 18:39:13 +0300 Subject: [PATCH] Rename funtion reportIfMissing to reportIfAbsolute The old name seems wrong. Probably copied from no-extraneuous-dependencies --- src/rules/no-absolute-path.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rules/no-absolute-path.js b/src/rules/no-absolute-path.js index 217bd4f32..8503be0d5 100644 --- a/src/rules/no-absolute-path.js +++ b/src/rules/no-absolute-path.js @@ -1,6 +1,6 @@ import isStaticRequire from '../core/staticRequire' -function reportIfMissing(context, node, name) { +function reportIfAbsolute(context, node, name) { if (isAbsolute(name)) { context.report(node, 'Do not import modules using an absolute path') } @@ -18,11 +18,11 @@ module.exports = { create: function (context) { return { ImportDeclaration: function handleImports(node) { - reportIfMissing(context, node, node.source.value) + reportIfAbsolute(context, node, node.source.value) }, CallExpression: function handleRequires(node) { if (isStaticRequire(node)) { - reportIfMissing(context, node, node.arguments[0].value) + reportIfAbsolute(context, node, node.arguments[0].value) } }, }