Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 4fbe44e

Browse files
author
Jeremy Wiebe
committed
Fix ES6 syntax in constant's area
1 parent 3018502 commit 4fbe44e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

es6/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,17 @@ Constant values that appear outside of a method scope should be in ALL_CAPS
6969

7070
```javascript
7171
// GOOD
72-
export DEFAULT_NAME = 'Element'
72+
export const DEFAULT_NAME = 'Element'
7373
74-
const STATE_CALLBACKS {
74+
const STATE_CALLBACKS = {
7575
pending: sendPendingResponse,
7676
completed: sendCompletedResponse,
7777
archived: sendArchivedResponse
7878
}
7979
8080
// BAD
81+
export const defaultName = 'Element'
82+
8183
class DatePicker {
8284
render() {
8385
// WRONG: constant is within a method

0 commit comments

Comments
 (0)