Skip to content

Commit

Permalink
make rule no-relative-parent-imports support windows (#1141)
Browse files Browse the repository at this point in the history
  • Loading branch information
1pete authored and benmosher committed Sep 9, 2018
1 parent e3a03de commit e8954db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/importType.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function isInternalModule(name, settings, path) {
}

function isRelativeToParent(name) {
return name.indexOf('../') === 0
return /^\.\.[\\/]/.test(name)
}

const indexFiles = ['.', './', './index', './index.js']
Expand All @@ -66,7 +66,7 @@ function isIndex(name) {
}

function isRelativeToSibling(name) {
return name.indexOf('./') === 0
return /^\.[\\/]/.test(name)
}

const typeTest = cond([
Expand Down

0 comments on commit e8954db

Please sign in to comment.