Skip to content

Commit

Permalink
Rename funtion reportIfMissing to reportIfAbsolute
Browse files Browse the repository at this point in the history
The old name seems wrong. Probably copied from no-extraneuous-dependencies
  • Loading branch information
Joachim Seminck committed May 24, 2017
1 parent 3e8438e commit 5aa2fe0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 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')
}
Expand All @@ -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)
}
},
}
Expand Down

0 comments on commit 5aa2fe0

Please sign in to comment.