File tree Expand file tree Collapse file tree 5 files changed +12
-1
lines changed Expand file tree Collapse file tree 5 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
This change log adheres to standards from [ Keep a CHANGELOG] ( http://keepachangelog.com ) .
5
5
6
6
## [ Unreleased]
7
+ ### Fixed
8
+ - [ ` namespace ` ] exception for get property from ` namespace ` import, which are re-export from commonjs module ([ #416 ] )
7
9
8
10
## [ 1.13.0] - 2016-08-11
9
11
### Added
Original file line number Diff line number Diff line change @@ -131,9 +131,12 @@ exports.create = function namespaceRule(context) {
131
131
break
132
132
}
133
133
134
+ const exported = namespace . get ( dereference . property . name )
135
+ if ( exported == null ) return
136
+
134
137
// stash and pop
135
138
namepath . push ( dereference . property . name )
136
- namespace = namespace . get ( dereference . property . name ) . namespace
139
+ namespace = exported . namespace
137
140
dereference = dereference . parent
138
141
}
139
142
Original file line number Diff line number Diff line change
1
+ export { default as b } from './b'
Original file line number Diff line number Diff line change
1
+ module . exports = { }
Original file line number Diff line number Diff line change @@ -84,4 +84,8 @@ export const SYNTAX_CASES = [
84
84
code : 'export * from "./issue-370-commonjs-namespace/bar"' ,
85
85
settings : { 'import/ignore' : [ 'foo' ] } ,
86
86
} ) ,
87
+
88
+ test ( {
89
+ code : 'import * as a from "./commonjs-namespace/a"; a.b' ,
90
+ } ) ,
87
91
]
You can’t perform that action at this time.
0 commit comments