Run suspicious-code checks in the linter.
This will help users catch when they write
var x = () => {
then: () => undefined
};
instead of
var x = () => ({
then: () => undefined
});
@@ -68,6 +68,8 @@ class LintPassConfig extends PassConfig.PassConfigDelegate {
new CheckRequiresAndProvidesSorted(compiler),
new CheckRequiresForConstructors(
compiler, CheckRequiresForConstructors.Mode.SINGLE_FILE),
+ new CheckSideEffects(
+ compiler, /* report */ true, /* protectSideEffectFreeCode */ false),
new CheckUnusedLabels(compiler),
new CheckUselessBlocks(compiler),
new ClosureCheckModule(compiler),
