Skip to content

Commit b5e14dc

Browse files
author
Jared Deckard
authored
Explain why default exports are preferred
1 parent dbdbde0 commit b5e14dc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,7 @@ Other Style Guides
12851285
<a name="modules--prefer-default-export"></a>
12861286
- [10.6](#modules--prefer-default-export) In modules with a single export, prefer default export over named export.
12871287
eslint: [`import/prefer-default-export`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md)
1288+
> Why? To encourage more files that only ever export one thing, which is better for readability and maintainability.
12881289

12891290
```javascript
12901291
// bad

0 commit comments

Comments
 (0)