DecisionUse JavaScript strict mode


Opt in to settings that raise errors for problematic code.

Table Of Contents


Use JavaScript's strict mode within all top-level functions (nested functions will inherit strict mode).

If the project only includes non-vendor code in a bundle, strict mode can be declared once at the top of the bundle file, instead of per function. When in doubt, declare strict mode per function.

If using ES modules, strict mode is implied, and should not be declared.


JavaScript errors will be more noticeable, leading to better code quality.

Andrew Berry, Andy Blum, Chris DeLuca, Mateu Aguiló Bosch

Decided on