This repository has been archived by the owner on May 19, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow duplicate named exports (#107)
fixes #69
- Loading branch information
1 parent
4e1fbd4
commit 650e333
Showing
16 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test/fixtures/es2015/modules/duplicate-export-default-and-export-as-default/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default function() {}; | ||
export { foo as default }; |
3 changes: 3 additions & 0 deletions
3
test/fixtures/es2015/modules/duplicate-export-default-and-export-as-default/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"throws": "Only one default export allowed per module. (2:9)" | ||
} |
2 changes: 2 additions & 0 deletions
2
test/fixtures/es2015/modules/duplicate-export-default/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default {}; | ||
export default function() {}; |
3 changes: 3 additions & 0 deletions
3
test/fixtures/es2015/modules/duplicate-export-default/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"throws": "Only one default export allowed per module. (2:0)" | ||
} |
2 changes: 2 additions & 0 deletions
2
test/fixtures/es2015/modules/duplicate-named-export-class-declaration/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { Foo }; | ||
export class Foo {}; |
4 changes: 4 additions & 0 deletions
4
test/fixtures/es2015/modules/duplicate-named-export-class-declaration/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"throws": "`Foo` has already been exported. Exported identifiers must be unique. (2:0)" | ||
} | ||
|
2 changes: 2 additions & 0 deletions
2
test/fixtures/es2015/modules/duplicate-named-export-function-declaration/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { foo }; | ||
export function foo() {}; |
3 changes: 3 additions & 0 deletions
3
test/fixtures/es2015/modules/duplicate-named-export-function-declaration/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"throws": "`foo` has already been exported. Exported identifiers must be unique. (2:0)" | ||
} |
2 changes: 2 additions & 0 deletions
2
test/fixtures/es2015/modules/duplicate-named-export-variable-declaration/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { foo }; | ||
export const foo = bar; |
3 changes: 3 additions & 0 deletions
3
test/fixtures/es2015/modules/duplicate-named-export-variable-declaration/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"throws": "`foo` has already been exported. Exported identifiers must be unique. (2:13)" | ||
} |
2 changes: 2 additions & 0 deletions
2
test/fixtures/es2015/modules/duplicate-named-export/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { foo }; | ||
export { bar as foo }; |
3 changes: 3 additions & 0 deletions
3
test/fixtures/es2015/modules/duplicate-named-export/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"throws": "`foo` has already been exported. Exported identifiers must be unique. (2:9)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export interface foo { p: number }; | ||
export interface foo<T> { p: T }; | ||
export interface bar<T> { p: T }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters