Skip to content

Commit 6528297

Browse files
committed
refactor(app): remove openapi-fetch compat folder and lint-clean promise client
1 parent a09c60d commit 6528297

20 files changed

Lines changed: 1614 additions & 857 deletions

packages/app/eslint.config.mts

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -341,37 +341,7 @@ export default defineConfig(
341341
},
342342
},
343343

344-
// 5) openapi-fetch compatibility layer: Promise-based types and pragmatic "any" are expected.
345-
// It is intentionally treated as a boundary/interop module.
346-
{
347-
files: ["src/shell/api-client/openapi-fetch-compat/**/*.ts"],
348-
rules: {
349-
"no-restricted-syntax": "off",
350-
"@typescript-eslint/no-restricted-types": "off",
351-
"@typescript-eslint/no-empty-object-type": "off",
352-
"@typescript-eslint/no-unnecessary-type-parameters": "off",
353-
"@typescript-eslint/no-invalid-void-type": "off",
354-
"@typescript-eslint/no-unsafe-assignment": "off",
355-
"@typescript-eslint/no-unsafe-argument": "off",
356-
"@typescript-eslint/no-unsafe-member-access": "off",
357-
"@typescript-eslint/no-unsafe-call": "off",
358-
"@typescript-eslint/no-unsafe-return": "off",
359-
"@typescript-eslint/no-unnecessary-condition": "off",
360-
"@typescript-eslint/no-base-to-string": "off",
361-
"sonarjs/pseudo-random": "off",
362-
"sonarjs/cognitive-complexity": "off",
363-
"sonarjs/different-types-comparison": "off",
364-
"unicorn/consistent-function-scoping": "off",
365-
"unicorn/prefer-string-slice": "off",
366-
complexity: "off",
367-
"max-lines": "off",
368-
"max-lines-per-function": "off",
369-
"max-params": "off",
370-
"max-depth": "off",
371-
},
372-
},
373-
374-
// 6) Generated OpenAPI schema uses canonical lowercase names from openapi-typescript
344+
// 5) Generated OpenAPI schema uses canonical lowercase names from openapi-typescript
375345
{
376346
files: ["src/core/api/openapi.d.ts"],
377347
rules: {
@@ -382,12 +352,12 @@ export default defineConfig(
382352
},
383353
},
384354

385-
// 7) Для JS-файлов отключим типо-зависимые проверки
355+
// 6) Для JS-файлов отключим типо-зависимые проверки
386356
{
387357
files: ['**/*.{js,cjs,mjs}'],
388358
extends: [tseslint.configs.disableTypeChecked],
389359
},
390360

391-
// 8) Глобальные игноры
361+
// 7) Глобальные игноры
392362
{ ignores: ['dist/**', 'build/**', 'coverage/**', '**/dist/**'] },
393363
);

packages/app/eslint.effect-ts-check.config.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,5 @@ export default tseslint.config(
244244
rule.selector !== "TSAsExpression" && rule.selector !== "TSTypeAssertion"
245245
)]
246246
}
247-
},
248-
{
249-
name: "effect-ts-compliance-ignores",
250-
ignores: ["src/shell/api-client/openapi-fetch-compat/**"]
251247
}
252248
)

packages/app/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
// COMPLEXITY: O(1)
77

88
// Promise-based client (openapi-fetch compatible)
9-
export { default } from "./shell/api-client/openapi-fetch-compat/index.js"
10-
export { createClient } from "./shell/api-client/openapi-fetch-compat/index.js"
11-
export * from "./shell/api-client/openapi-fetch-compat/index.js"
9+
export { default } from "./shell/api-client/promise-client/index.js"
10+
export { createClient } from "./shell/api-client/promise-client/index.js"
11+
export * from "./shell/api-client/promise-client/index.js"
1212

1313
// Effect-based client (opt-in)
1414
export * as FetchHttpClient from "@effect/platform/FetchHttpClient"

packages/app/src/shell/api-client/create-client-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import type {
2222
ResponsesFor
2323
} from "../../core/api-client/strict-types.js"
2424
import type { Dispatcher } from "../../core/axioms.js"
25-
import type { ClientOptions as OpenapiFetchClientOptions } from "./openapi-fetch-compat/types.js"
25+
import type { ClientOptions as OpenapiFetchClientOptions } from "./promise-client/types.js"
2626

2727
/**
2828
* Client configuration options

0 commit comments

Comments
 (0)