Always include 'use strict'; default?

I use Browserify to break my application into modules. I wonder if I can somehow enable 'use strict'; so that it is applied to all the code I'm writing for a project?

Or can it be possible to configure node to always use strict mode locally for some folders / files or the whole project?

+5
source share
1 answer

There is a great conversion for the browser for this: strictify . It inserts 'use strict' in closing your modules.

Just update package.json as follows:

 "devDependencies": { "strictify": "^0.2.0" }, "browserify": { "transform": [ "strictify" ] } 
0
source

Source: https://habr.com/ru/post/1239410/


All Articles