refactor: eliminate eslint errors (#920)

* refactor: eliminate eslint errors as many as I can

* refactor: fix more eslint errors in the record module

* LINT: fix @typescript-eslint/unbound-method

* LINT: fix all eslint errors in source code

* LINT: fix as many eslint warnings as possible

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
This commit is contained in:
Yun Feng
2022-07-10 17:49:20 +10:00
committed by GitHub
parent 15cb0b8cd3
commit 83394c3db4
44 changed files with 524 additions and 374 deletions

View File

@@ -118,6 +118,7 @@ export function typeOf(
| 'undefined'
| 'null'
| 'object' {
// eslint-disable-next-line @typescript-eslint/unbound-method
const toString = Object.prototype.toString;
const map = {
'[object Boolean]': 'boolean',
@@ -131,5 +132,6 @@ export function typeOf(
'[object Null]': 'null',
'[object Object]': 'object',
};
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
return map[toString.call(obj)];
}