From 131c9bf530401accb12a3fa5827aeb85923d2798 Mon Sep 17 00:00:00 2001 From: ssube Date: Wed, 29 Jul 2020 08:22:32 -0500 Subject: [PATCH] lint: type naming for new rules --- config/eslint.json | 16 +++++++++++----- docs/api/js-utils.constructorname.md | 4 ++-- docs/api/js-utils.getconstructor.md | 4 ++-- docs/api/js-utils.getmethods.md | 4 ++-- docs/api/js-utils.timeout.md | 4 ++-- src/Reflect.ts | 13 +++++++++---- src/Signal.ts | 2 +- 7 files changed, 29 insertions(+), 18 deletions(-) diff --git a/config/eslint.json b/config/eslint.json index 4d79504..e0ac66e 100644 --- a/config/eslint.json +++ b/config/eslint.json @@ -106,6 +106,15 @@ "leadingUnderscore": "forbid", "trailingUnderscore": "forbid" }, + { + "selector": "enumMember", + "format": [ + "camelCase", + "UPPER_CASE" + ], + "leadingUnderscore": "forbid", + "trailingUnderscore": "forbid" + }, { "selector": "typeLike", "format": [ @@ -120,10 +129,7 @@ "PascalCase" ], "leadingUnderscore": "forbid", - "trailingUnderscore": "forbid", - "prefix": [ - "I" - ] + "trailingUnderscore": "forbid" } ], "@typescript-eslint/no-empty-function": "error", @@ -423,4 +429,4 @@ } ] } -} \ No newline at end of file +} diff --git a/docs/api/js-utils.constructorname.md b/docs/api/js-utils.constructorname.md index 2e3d9a5..8905b3a 100644 --- a/docs/api/js-utils.constructorname.md +++ b/docs/api/js-utils.constructorname.md @@ -9,14 +9,14 @@ Get the constructor name from an instance. Signature: ```typescript -export declare function constructorName(val: object): string; +export declare function constructorName(val: Reflectable): string; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| val | object | | +| val | Reflectable | | Returns: diff --git a/docs/api/js-utils.getconstructor.md b/docs/api/js-utils.getconstructor.md index f78eb8c..1f167e1 100644 --- a/docs/api/js-utils.getconstructor.md +++ b/docs/api/js-utils.getconstructor.md @@ -9,14 +9,14 @@ Get the constructor from an instance. Signature: ```typescript -export declare function getConstructor(val: object): Function; +export declare function getConstructor(val: Reflectable): Function; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| val | object | | +| val | Reflectable | | Returns: diff --git a/docs/api/js-utils.getmethods.md b/docs/api/js-utils.getmethods.md index 20a0d21..8a969ba 100644 --- a/docs/api/js-utils.getmethods.md +++ b/docs/api/js-utils.getmethods.md @@ -9,7 +9,7 @@ Get the methods from an instance and its prototypes. Signature: ```typescript -export declare function getMethods(value: TValue): Set; +export declare function getMethods(value: TValue): Set>; ``` ## Parameters @@ -20,5 +20,5 @@ export declare function getMethods(value: TValue): SetReturns: -Set<Function> +Set<Method<TValue>> diff --git a/docs/api/js-utils.timeout.md b/docs/api/js-utils.timeout.md index 23e6d37..8f2a00a 100644 --- a/docs/api/js-utils.timeout.md +++ b/docs/api/js-utils.timeout.md @@ -9,7 +9,7 @@ Reject after a set amount of time if the original promise has not yet resolved. Signature: ```typescript -export declare function timeout(ms: number, oper: Promise): Promise>; +export declare function timeout(ms: number, oper: Promise): Promise; ``` ## Parameters @@ -21,5 +21,5 @@ export declare function timeout(ms: number, oper: Promise): Promise