Skip to content

Commit 5f68e78

Browse files
Copilotpalashmon
andauthored
Fix CI failing due to linter/style errors (#72)
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> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: palashmon <14850464+palashmon@users.noreply.github.com>
1 parent 082191a commit 5f68e78

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare module 'unique-objects' {
2-
type Obj = Record<string, unknown>;
2+
type ObjectType = Record<string, unknown>;
33

4-
export default function (arrayInput: Obj[], keys: (keyof Obj)[]): Obj[];
4+
export default function (arrayInput: ObjectType[], keys: Array<keyof ObjectType>): ObjectType[];
55
}

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
function uniqueObjects(arrayInput = [], keys = []) {
22
if (!Array.isArray(arrayInput)) {
3-
throw new TypeError(
4-
`Expected an array for arrayInput, got ${typeof arrayInput}`,
5-
);
3+
throw new TypeError(`Expected an array for arrayInput, got ${typeof arrayInput}`);
64
}
75

86
if (!Array.isArray(keys)) {

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
"xo": "0.61.1"
4646
},
4747
"type": "module",
48-
"eslintIgnore": [
49-
"index.d.ts"
50-
]
48+
"xo": {
49+
"ignores": [
50+
"*.d.ts"
51+
]
52+
}
5153
}

0 commit comments

Comments
 (0)