Skip to content

Commit 059aaa9

Browse files
committed
fix: Resolve eslint-plugin-unicorn lint errors
1 parent 282697c commit 059aaa9

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎src/memdb/memdb.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ const spec = {
3131
},
3232
};
3333

34-
type Spec = {
35-
concurrency: number;
36-
};
37-
3834
const ajv = new Ajv.default();
3935
const validate = ajv.compile(spec);
4036

4137
export const newMemDBPlugin = (): Plugin => {
38+
type Spec = {
39+
concurrency: number;
40+
};
41+
4242
const memdbClient = createMemDBClient();
4343
const memoryDB = memdbClient.memoryDB;
4444
const tables = memdbClient.tables;

‎src/scalar/list.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ export class List<T extends Scalar<unknown>> implements Scalar<Nullable<TVector<
8686

8787
// If you need an equality method, you can add an equals method similar to the Python __eq__
8888
equals(other: List<T>): boolean {
89-
if (!other || this.constructor !== other.constructor || this._valid !== other.valid) return false;
90-
return JSON.stringify(this._value) === JSON.stringify(other.value); // crude equality check for objects, might need refinement.
89+
return (
90+
Boolean(other) &&
91+
this.constructor === other.constructor &&
92+
this._valid === other.valid &&
93+
JSON.stringify(this._value) === JSON.stringify(other.value) // crude equality check for objects, might need refinement.
94+
);
9195
}
9296
}

0 commit comments

Comments
 (0)