google / google/closure-compiler
Warn About Invalid "use strict" Usage in ES 2016 Code
Open
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
> ECMAScript 2016 says that the "use strict" directive cannot be used in the body of a function whose parameters either have default values, use destructuring, or a rest parameter. The specification defines simple parameters as parameter lists that contain only identifiers (ECMAScript 5 only supported simple parameter lists)[1]. The change affects all function types, including function declarations and expressions, arrow functions, and concise object literal methods.
See https://www.nczonline.net/blog/2016/10/the-ecmascript-2016-change-you-probably-dont-know/
Contributor guide
Assessment
This issue has not been assessed yet.