How to enable strict mode in node by default?

I just started (learning while working) a new project in nodejs. I am going to use ES5 and ES6 (I need to know the features of ES6). Well, IMO, using "use strict" in every file is a tedious task and is looking for ways to enable strict mode by default, so I don’t need to write this line in every file. Since I don't have the old code, don't worry about backward compatibility. Can someone help me enable strict mode by default in java script?

+4
source share
1 answer

you can use

$ node --use-strict

.
. node? .

+8

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


All Articles