greenkeeperio / greenkeeper-lockfile

:lock: Your lockfile, up to date, all the time
https://greenkeeper.io
183 stars 73 forks source link

fix: Enable strict mode in all files #55

Closed sudo-suhas closed 6 years ago

sudo-suhas commented 7 years ago

Right now, only a few files have the 'use strict' directive. I am not entirely sure why this isn't resulting in error like the following:

λ node --version
v4.0.0

λ echo let a = 1 > test-node4.js

λ node test-node4.js
E:\Projects\experiments\test-node4.js:1
(function (exports, require, module, __filename, __dirname) { let a = 1
                                                              ^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:413:25)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
    at node.js:951:3

This enables strict mode in all js files.

sudo-suhas commented 6 years ago

ping @boennemann @christophwitzko

janl commented 6 years ago

Thanks!