From c842cc260f6d773bf4dc800ebebc47dd026cab0a Mon Sep 17 00:00:00 2001 From: Joel Purra Date: Tue, 21 Jan 2020 17:56:44 +0100 Subject: [PATCH] Upgrade dependencies (#101) --- package.json | 13 ++++++++----- source/index.ts | 2 +- test/test.ts | 2 +- tsconfig.xo.json | 6 ++++++ 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 tsconfig.xo.json diff --git a/package.json b/package.json index 1bb1f91..5867b4f 100644 --- a/package.json +++ b/package.json @@ -46,20 +46,20 @@ "types" ], "devDependencies": { - "@sindresorhus/tsconfig": "^0.6.0", + "@sindresorhus/tsconfig": "^0.7.0", "@types/jsdom": "^12.2.4", "@types/node": "^12.12.6", "@types/zen-observable": "^0.8.0", - "@typescript-eslint/eslint-plugin": "^1.11.0", - "@typescript-eslint/parser": "^1.11.0", + "@typescript-eslint/eslint-plugin": "^2.17.0", + "@typescript-eslint/parser": "^2.17.0", "ava": "^2.1.0", "del-cli": "^2.0.0", - "eslint-config-xo-typescript": "^0.15.0", + "eslint-config-xo-typescript": "^0.24.1", "jsdom": "^15.0.0", "rxjs": "^6.4.0", "tempy": "^0.3.0", "ts-node": "^8.3.0", - "typescript": "^3.7.2", + "typescript": "^3.7.5", "xo": "^0.25.3", "zen-observable": "^0.8.8" }, @@ -80,6 +80,9 @@ "extensions": [ "ts" ], + "parserOptions": { + "project": "./tsconfig.xo.json" + }, "globals": [ "BigInt", "BigInt64Array", diff --git a/source/index.ts b/source/index.ts index 6cb8159..94ba314 100644 --- a/source/index.ts +++ b/source/index.ts @@ -278,8 +278,8 @@ is.typedArray = (value: unknown): value is TypedArray => { }; export interface ArrayLike { - readonly length: number; readonly [index: number]: T; + readonly length: number; } const isValidLength = (value: unknown): value is number => is.safeInteger(value) && value >= 0; diff --git a/test/test.ts b/test/test.ts index 0d9c13a..b7d017d 100644 --- a/test/test.ts +++ b/test/test.ts @@ -457,7 +457,7 @@ const testType = (t: ExecutionContext, type: string, exclude?: string[]) => { for (const [key, {fixtures}] of types) { // TODO: Automatically exclude value types in other tests that we have in the current one. // Could reduce the use of `exclude`. - if (exclude && exclude.includes(key)) { + if (exclude?.includes(key)) { continue; } diff --git a/tsconfig.xo.json b/tsconfig.xo.json new file mode 100644 index 0000000..b01049f --- /dev/null +++ b/tsconfig.xo.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "test" + ] +}