Skip to content

Commit

Permalink
Merge 5264464 into 5e143b2
Browse files Browse the repository at this point in the history
  • Loading branch information
AamuLumi committed Oct 8, 2019
2 parents 5e143b2 + 5264464 commit 58b4014
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel

### Fixed
- `default`: make error message less confusing ([#1470], thanks [@golopot])
- `order`: fix `@someModule` considered as `unknown` instead of `internal` ([#1493], thanks [@aamulumi])

## [2.18.2] - 2019-07-19
- Skip warning on type interfaces ([#1425], thanks [@lencioni])
Expand Down Expand Up @@ -608,6 +609,7 @@ for info on changes for earlier releases.

[`memo-parser`]: ./memo-parser/README.md

[#1493]: https://github.com/benmosher/eslint-plugin-import/pull/1493
[#1472]: https://github.com/benmosher/eslint-plugin-import/pull/1472
[#1470]: https://github.com/benmosher/eslint-plugin-import/pull/1470
[#1436]: https://github.com/benmosher/eslint-plugin-import/pull/1436
Expand Down Expand Up @@ -989,3 +991,5 @@ for info on changes for earlier releases.
[@JounQin]: https://github.com/JounQin
[@atikenny]: https://github.com/atikenny
[@schmidsi]: https://github.com/schmidsi
[@golopot]: https://github.com/golopot
[@aamulumi]: https://github.com/aamulumi
2 changes: 1 addition & 1 deletion src/core/importType.js
Expand Up @@ -43,7 +43,7 @@ export function isExternalModuleMain(name, settings, path) {
return externalModuleMainRegExp.test(name) && isExternalPath(path, name, settings)
}

const scopedRegExp = /^@[^/]+\/[^/]+/
const scopedRegExp = /^@[^/]+\/?[^/]+/
function isScoped(name) {
return scopedRegExp.test(name)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/importType.js
Expand Up @@ -55,6 +55,7 @@ describe('importType(name)', function () {
it("should return 'internal' for internal modules that are referenced by aliases", function () {
const pathContext = testContext({ 'import/resolver': { node: { paths: [pathToTestFiles] } } })
expect(importType('@my-alias/fn', pathContext)).to.equal('internal')
expect(importType('@importType', pathContext)).to.equal('internal')
})

it("should return 'internal' for aliased internal modules that look like core modules (node resolver)", function () {
Expand Down Expand Up @@ -96,7 +97,6 @@ describe('importType(name)', function () {
})

it("should return 'unknown' for any unhandled cases", function() {
expect(importType('@malformed', context)).to.equal('unknown')
expect(importType(' /malformed', context)).to.equal('unknown')
expect(importType(' foo', context)).to.equal('unknown')
})
Expand Down

0 comments on commit 58b4014

Please sign in to comment.