From 653927a0bf5a698276271cc032ccc8d17d573cd0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 Aug 2025 08:50:51 +0000 Subject: [PATCH 1/3] Initial plan From 445c03f3a847921eba1877f4325b4a865c917e5e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 Aug 2025 08:56:57 +0000 Subject: [PATCH 2/3] Initial analysis of linting issues Co-authored-by: palashmon <14850464+palashmon@users.noreply.github.com> --- index.d.ts | 4 ++-- index.js | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index ee6fb56..043318b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,5 @@ declare module 'unique-objects' { - type Obj = Record; + type Object_ = Record; - export default function (arrayInput: Obj[], keys: (keyof Obj)[]): Obj[]; + export default function (arrayInput: Object_[], keys: Array): Object_[]; } diff --git a/index.js b/index.js index 3870235..fb1c75c 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,6 @@ function uniqueObjects(arrayInput = [], keys = []) { if (!Array.isArray(arrayInput)) { - throw new TypeError( - `Expected an array for arrayInput, got ${typeof arrayInput}`, - ); + throw new TypeError(`Expected an array for arrayInput, got ${typeof arrayInput}`); } if (!Array.isArray(keys)) { From fefc98754f6e9d61a9d76c234977f2fbe3d0ecb3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 Aug 2025 09:00:18 +0000 Subject: [PATCH 3/3] Fix linting issues: rename type to ObjectType and configure XO to ignore .d.ts files Co-authored-by: palashmon <14850464+palashmon@users.noreply.github.com> --- index.d.ts | 4 ++-- package.json | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 043318b..52b44bf 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,5 @@ declare module 'unique-objects' { - type Object_ = Record; + type ObjectType = Record; - export default function (arrayInput: Object_[], keys: Array): Object_[]; + export default function (arrayInput: ObjectType[], keys: Array): ObjectType[]; } diff --git a/package.json b/package.json index e4ee34b..3d7268c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,9 @@ "xo": "0.61.1" }, "type": "module", - "eslintIgnore": [ - "index.d.ts" - ] + "xo": { + "ignores": [ + "*.d.ts" + ] + } }