chore(basic): add the missing restricted rules about window object (#191)

This commit is contained in:
曾明健 2023-05-31 20:40:11 +08:00 committed by GitHub
parent 5d908028ca
commit 84ae087ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,6 +274,10 @@ module.exports = {
{ object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead' }, { object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead' },
{ object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead' }, { object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
{ object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead' }, { object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead' },
{ object: 'window', property: 'isNaN', message: 'Use `Number.isNaN` instead' },
{ object: 'window', property: 'isFinite', message: 'Use `Number.isFinite` instead' },
{ object: 'window', property: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
{ object: 'window', property: 'parseInt', message: 'Use `Number.parseInt` instead' },
], ],
// es6 // es6