diff --git a/packages/elevenlabs-client/src/index.ts b/packages/elevenlabs-client/src/index.ts index 2a70974..46d85e8 100644 --- a/packages/elevenlabs-client/src/index.ts +++ b/packages/elevenlabs-client/src/index.ts @@ -1,4 +1,3 @@ - import { type FetchError, type TResult } from 'feature-fetch'; import { type TGenerateTextToSpeechConfig, type TVoiceResponse } from './types'; diff --git a/packages/eprel-client/src/index.ts b/packages/eprel-client/src/index.ts index 62ae8dd..34fd0eb 100644 --- a/packages/eprel-client/src/index.ts +++ b/packages/eprel-client/src/index.ts @@ -1,4 +1,3 @@ - import { type FetchError, type TResult } from 'feature-fetch'; import type { components } from './gen/v1'; import { diff --git a/packages/feature-fetch/src/create-fetch-client.ts b/packages/feature-fetch/src/create-fetch-client.ts index 2e42b53..c4eeb31 100644 --- a/packages/feature-fetch/src/create-fetch-client.ts +++ b/packages/feature-fetch/src/create-fetch-client.ts @@ -99,7 +99,6 @@ export function createFetchClient( // Process before request middlewares try { for (const middleware of this._config.beforeRequestMiddlewares) { - await middleware({ path, props: middlewareProps, diff --git a/packages/feature-fetch/src/features/with-graphql/gql.ts b/packages/feature-fetch/src/features/with-graphql/gql.ts index d197e44..480e9aa 100644 --- a/packages/feature-fetch/src/features/with-graphql/gql.ts +++ b/packages/feature-fetch/src/features/with-graphql/gql.ts @@ -1,5 +1,3 @@ - - // https://github.com/apollographql/graphql-tag/blob/main/src/index.ts export function gql(literals: TemplateStringsArray, ...args: unknown[]): string { // If a single string is passed, return it as is diff --git a/packages/feature-fetch/src/types/features/index.ts b/packages/feature-fetch/src/types/features/index.ts index 493467b..7e70b1b 100644 --- a/packages/feature-fetch/src/types/features/index.ts +++ b/packages/feature-fetch/src/types/features/index.ts @@ -19,7 +19,7 @@ export type TFeatures = { } & TThirdPartyFeatures; // Global registry for third party features - + export interface TThirdPartyFeatures {} export type TFeatureKeys = keyof TFeatures; diff --git a/packages/feature-form/src/types/features.ts b/packages/feature-form/src/types/features.ts index 32b307c..1d1b6da 100644 --- a/packages/feature-form/src/types/features.ts +++ b/packages/feature-form/src/types/features.ts @@ -6,7 +6,7 @@ export type TFeatures = { } & TThirdPartyFeatures; // Global registry for third party features - + export interface TThirdPartyFeatures {} export type TFeatureKeys = keyof TFeatures; diff --git a/packages/feature-logger/src/types/features.ts b/packages/feature-logger/src/types/features.ts index c4737b5..2bdde54 100644 --- a/packages/feature-logger/src/types/features.ts +++ b/packages/feature-logger/src/types/features.ts @@ -8,7 +8,7 @@ export type TFeatures = { } & TThirdPartyFeatures; // Global registry for third party features - + export interface TThirdPartyFeatures {} export type TFeatureKeys = keyof TFeatures; diff --git a/packages/feature-react/src/state/hooks/use-selector.ts b/packages/feature-react/src/state/hooks/use-selector.ts index d68b7c8..0ca4b6a 100644 --- a/packages/feature-react/src/state/hooks/use-selector.ts +++ b/packages/feature-react/src/state/hooks/use-selector.ts @@ -9,7 +9,6 @@ export function useSelector>( const [, forceRender] = React.useReducer((s: number) => s + 1, 0); React.useEffect(() => { - const unbind = state.listenToSelected( [selectedProperty], ({ background }) => { diff --git a/packages/feature-state/src/types/features.ts b/packages/feature-state/src/types/features.ts index 22d8c10..7ac6b9b 100644 --- a/packages/feature-state/src/types/features.ts +++ b/packages/feature-state/src/types/features.ts @@ -23,7 +23,7 @@ export type TFeatures = { } & TThirdPartyFeatures; // Global registry for third party features - + export interface TThirdPartyFeatures {} export type TFeatureKeys = keyof TFeatures; diff --git a/packages/google-webfonts-client/src/index.ts b/packages/google-webfonts-client/src/index.ts index 5dad8b0..e938005 100644 --- a/packages/google-webfonts-client/src/index.ts +++ b/packages/google-webfonts-client/src/index.ts @@ -1,4 +1,3 @@ - import type { FetchError, TFetchClient, TResult } from 'feature-fetch'; import type { components } from './gen/v1'; import { diff --git a/packages/openapi-router/src/features/with-express/with-express.ts b/packages/openapi-router/src/features/with-express/with-express.ts index 69ceb03..6e8be7a 100644 --- a/packages/openapi-router/src/features/with-express/with-express.ts +++ b/packages/openapi-router/src/features/with-express/with-express.ts @@ -101,7 +101,6 @@ function validationMiddleware( ): express.RequestHandler { const { bodyValidator, pathValidator, queryValidator } = validators; - return async (req, _res, next) => { try { const validationErrors: TValidationError[] = []; @@ -149,10 +148,8 @@ function validationMiddleware( } function requestHandler(handler: express.RequestHandler): express.RequestHandler { - return async (req, res, next) => { try { - await handler(req, res, next); } catch (error) { next(error); diff --git a/packages/openapi-router/src/types/features/index.ts b/packages/openapi-router/src/types/features/index.ts index 1a90fca..79759a6 100644 --- a/packages/openapi-router/src/types/features/index.ts +++ b/packages/openapi-router/src/types/features/index.ts @@ -12,7 +12,6 @@ export type TFeatures = { } & TThirdPartyFeatures; // Global registry for third party features - export interface TThirdPartyFeatures {} export type TFeatureKeys = keyof TFeatures; diff --git a/packages/utils/src/hex-to-rgb.ts b/packages/utils/src/hex-to-rgb.ts index 8b2f601..77823b8 100644 --- a/packages/utils/src/hex-to-rgb.ts +++ b/packages/utils/src/hex-to-rgb.ts @@ -13,13 +13,13 @@ export function hexToRgb(hex: THexColor): TRgbColor | null { const hexValue = hex.slice(1); if (hexValue.length === 3) { // @ts-expect-error -- Covered by above regex check - + r = parseInt(hexValue[0] + hexValue[0], 16); // @ts-expect-error -- Covered by above regex check - + g = parseInt(hexValue[1] + hexValue[1], 16); // @ts-expect-error -- Covered by above regex check - + b = parseInt(hexValue[2] + hexValue[2], 16); } else { r = parseInt(hexValue.slice(0, 2), 16); diff --git a/packages/utils/src/is-object.test.ts b/packages/utils/src/is-object.test.ts index 07783bd..e309fb0 100644 --- a/packages/utils/src/is-object.test.ts +++ b/packages/utils/src/is-object.test.ts @@ -22,9 +22,8 @@ describe('isObject function', () => { }); it('should return false for functions', () => { - expect(isObject(function () {})).toBeFalsy(); - + expect(isObject(() => {})).toBeFalsy(); }); }); diff --git a/packages/utils/src/json-function.ts b/packages/utils/src/json-function.ts index 47b1418..5eea0a5 100644 --- a/packages/utils/src/json-function.ts +++ b/packages/utils/src/json-function.ts @@ -1,5 +1,4 @@ export function toFunction(jsonFunction: TJsonFunction): Function { - return new Function(...jsonFunction.args, jsonFunction.body); } diff --git a/packages/utils/src/to-hex.ts b/packages/utils/src/to-hex.ts index 9e72598..4df8dd8 100644 --- a/packages/utils/src/to-hex.ts +++ b/packages/utils/src/to-hex.ts @@ -1,12 +1,9 @@ - - // Pre-Init (constants are precomputed for performance reasons) const LUT_HEX_4b = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']; const LUT_HEX_8b = new Array(0x100).fill(''); // Populate the lookup table for hex values for (let n = 0; n < 0x100; n++) { - LUT_HEX_8b[n] = `${LUT_HEX_4b[(n >>> 4) & 0xf]}${LUT_HEX_4b[n & 0xf]}`; } @@ -26,7 +23,7 @@ export function toHex(buffer: Uint8Array | Buffer): string { let out = ''; for (let idx = 0, len = buffer.length; idx < len; idx++) { // @ts-expect-error - buffer can't be undefined because we check length in for loop - + out += LUT_HEX_8b[buffer[idx]]; } diff --git a/packages/validation-adapter/src/types.ts b/packages/validation-adapter/src/types.ts index 310ea45..b7858c5 100644 --- a/packages/validation-adapter/src/types.ts +++ b/packages/validation-adapter/src/types.ts @@ -31,7 +31,7 @@ export type TValidateCallback< export interface TBaseValidationContext { config: TValidationContextConfig; - + value: Readonly; hasError: () => boolean; isValue: (value: unknown) => value is GValue; // NOTE: We have to define a property using explicitly GValue to enforce generic. See: https://stackoverflow.com/questions/78716973/enforcing-same-generic-types-in-typescript/78717389 diff --git a/packages/xml-tokenizer/src/__tests__/xml-to-object.bench.ts b/packages/xml-tokenizer/src/__tests__/xml-to-object.bench.ts index faade34..863556f 100644 --- a/packages/xml-tokenizer/src/__tests__/xml-to-object.bench.ts +++ b/packages/xml-tokenizer/src/__tests__/xml-to-object.bench.ts @@ -23,7 +23,6 @@ void describe('xml to object', () => { }); bench('[xml-tokenizer (dist)]', () => { - const result = xtDist.xmlToObject(xml); expect(result).not.toBeNull(); });