Apply new eslint rules; default to prettier for styling
This commit is contained in:
parent
f22cce8881
commit
dc84af9937
218 changed files with 3876 additions and 3564 deletions
|
@ -3,7 +3,7 @@
|
|||
* is not null.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
function isObject (val: unknown): val is {} {
|
||||
function isObject(val: unknown): val is {} {
|
||||
return typeof val === 'object' && val !== null && !Array.isArray(val);
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ function isObject (val: unknown): val is {} {
|
|||
* and the prototype value.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
function isEmptyObject (val: {}): boolean {
|
||||
function isEmptyObject(val: {}): boolean {
|
||||
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ function isEmptyObject (val: {}): boolean {
|
|||
* easier.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
function getObjectKeys<T extends {}> (o: T): (keyof T)[] {
|
||||
function getObjectKeys<T extends {}>(o: T): (keyof T)[] {
|
||||
return Object.keys(o) as (keyof typeof o)[];
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue