From 84ae087ea0cd44e419f7cb3a8ccc85aa8e8d27ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E6=98=8E=E5=81=A5?= Date: Wed, 31 May 2023 20:40:11 +0800 Subject: [PATCH] chore(basic): add the missing restricted rules about `window` object (#191) --- packages/eslint-config-basic/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/eslint-config-basic/index.js b/packages/eslint-config-basic/index.js index 83bff0f..e3eb686 100644 --- a/packages/eslint-config-basic/index.js +++ b/packages/eslint-config-basic/index.js @@ -274,6 +274,10 @@ module.exports = { { object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead' }, { object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` 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