eslint-plugin

@masknet/browser/prefer-location-assign

Prefer location.assign(...) over location.*

Rule Details

Safely Navigate to target url

:x: Incorrect

location = url
location.href = url

:white_check_mark: Correct

location.assign(url)
location.replace(url)

Attributes