@masknet/no-unsafe-date
Disallow use unsafe Date methods
Mutating dates can create confusing bugs. Instead, create new dates using a library like date-fns.
Only the following methods are allowed
.getTime()
.getTimezoneOffset()
.to{JSON,String}()
.to{ISO,UTC,GMT}String()
.toLocaleString()
.toLocale{Date,Time}String()
.valueOf()
const expiration = new Date()
expiration.setFullYear(2010, 05, 23)
expiration.setHours(12)
expiration.setDate(17)
expiration.setSeconds(30)