JavaScript

JavaScript

Made by DeepSource

Prefer to use $window instead of window JS-0569

Anti-pattern
Major
angularjs

Instead of the default window object, prefer the AngularJS wrapper service $window.

Rule based on Angular 1.x

Bad Practice

window.alert('Hello world!');

Recommended

$window.alert('Hello world!');