Commit Graph

4 Commits

Author SHA1 Message Date
HE Shi-Jun 48f06041d1
Drop unuseful `eval` call
If use CSP (without `unsafe-eval`), both `new Function` and `eval` will be forbidden, so `eval` part is just dead code.

The only possibility `eval` part would run was `new Function('return this')()` return a falsy value, but it never possible as the spec (Is there any old engine violate this? Never heard about that.)

This pr also add `new` keyword to make the code a little bit explicit.
2018-11-16 17:20:53 +08:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Sean Larkin aa8d01bf8d refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot (#3636)
* refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot

* This change allows for buildin to now be part of the lint test by addition of an extra .eslintrc file which extends existing but sets es6 to false
* Turned on no-unused-vars for eslint, and then removed all warnings from turning that feature on
* Was getting notified of errors in "quote" property in eslintrc, so changed to correct value from error to 2.

* beautify

* swap invalid eslint config val
2016-12-30 09:43:49 -06:00
Tobias Koppers 2ff9a247e2 better global support, even in strict mode 2016-05-06 11:36:36 +02:00