Skip to content

Commit ee89999

Browse files
author
Tomek Wiszniewski
committed
Allow reserved words as keys in ES6 module context
`<script type="module">` and *node*/*iojs* code imply full support of ES5. Code transpiled by *babel* is also perfecly safe: ```js $ cat <<––– | babel const superman = { default: { clark: 'kent' }, private: true }; ––– "use strict"; var superman = { "default": { clark: "kent" }, "private": true }; ```
1 parent 38d2282 commit ee89999

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
const item = {};
141141
```
142142
143-
- [3.2](#3.2) <a name='3.2'></a> Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61).
143+
- [3.2](#3.2) <a name='3.2'></a> If your code will be executed in browsers in script context, don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61). It’s OK to use them in ES6 modules and server-side code.
144144

145145
```javascript
146146
// bad

0 commit comments

Comments
 (0)