Skip to content

Commit

Permalink
prefer-default-export: handle export extensions default re-export (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benmosher committed Nov 7, 2016
1 parent 2517820 commit 314d6ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/prefer-default-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {

return {
'ExportDefaultSpecifier': function() {
specifierExportCount++
hasDefaultExport = true
},

'ExportSpecifier': function(node) {
Expand Down
10 changes: 10 additions & 0 deletions tests/src/rules/prefer-default-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ ruleTester.run('prefer-default-export', rule, {
parser: 'babel-eslint',
}),

// issue #653
test({
code: 'export default from "foo.js"',
parser: 'babel-eslint',
}),
test({
code: 'export { a, b } from "foo.js"',
parser: 'babel-eslint',
}),

// ...SYNTAX_CASES,
],
invalid: [
Expand Down

0 comments on commit 314d6ab

Please sign in to comment.