@skapxd/eslint-opinionated 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -23
- package/dist/astro/index.mjs +2 -2
- package/dist/{chunk-P32EECMV.mjs → chunk-3XDQN6ZH.mjs} +2 -2
- package/dist/{chunk-TFGBNVXP.mjs → chunk-NYLQRBBK.mjs} +6 -5
- package/dist/{chunk-TFGBNVXP.mjs.map → chunk-NYLQRBBK.mjs.map} +1 -1
- package/dist/{chunk-SUNOHZFS.mjs → chunk-OQLKVDGZ.mjs} +2 -2
- package/dist/{chunk-RP7BOODV.mjs → chunk-OYVXAPDZ.mjs} +19 -10
- package/dist/chunk-OYVXAPDZ.mjs.map +1 -0
- package/dist/index.js +24 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/next/index.mjs +2 -2
- package/dist/shared/index.d.mts +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +23 -13
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-RP7BOODV.mjs.map +0 -1
- /package/dist/{chunk-P32EECMV.mjs.map → chunk-3XDQN6ZH.mjs.map} +0 -0
- /package/dist/{chunk-SUNOHZFS.mjs.map → chunk-OQLKVDGZ.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -318,7 +318,7 @@ export default [
|
|
|
318
318
|
El contrato del front: ninguna función está obligada a retornar `Result`, pero
|
|
319
319
|
toda llamada asíncrona debe ir envuelta en `trySafe` — salvo que lo llamado ya
|
|
320
320
|
retorne `Result`/`Promise<Result<...>>` (exención type-aware de
|
|
321
|
-
`skapxd/await-requires-
|
|
321
|
+
`skapxd/await-requires-result`). Aplica el preset a TODO el código del front
|
|
322
322
|
(componentes, hooks, servicios), no solo a los componentes.
|
|
323
323
|
|
|
324
324
|
### Next.js
|
|
@@ -429,7 +429,7 @@ bloque con `linterOptions: { noInlineConfig: false }` para esos globs.
|
|
|
429
429
|
| `skapxd/one-root-function-per-file` | Un archivo, una función top-level semántica. |
|
|
430
430
|
| `skapxd/async-functions-return-result` | Funciones async de dominio deben retornar `Promise<Result<...>>`. |
|
|
431
431
|
| `skapxd/result-error-requires-cause` | Un `Result.err` derivado debe preservar `cause: result.error`. |
|
|
432
|
-
| `skapxd/await-requires-
|
|
432
|
+
| `skapxd/await-requires-result` | Todo `await` debe resolver en un `Result`: o la función llamada retorna `Promise<Result<...>>` (preferido) o se envuelve en `trySafe`. La activa `shared.frontend`. |
|
|
433
433
|
| `skapxd/no-ad-hoc-ok-result` | Evita contratos `{ ok: ... }` hechos a mano en async exports. |
|
|
434
434
|
| `skapxd/max-hook-size` | Marca hooks grandes o con demasiados `useState`. |
|
|
435
435
|
| `skapxd/jsx-return-name-pascal-case` | Funciones que retornan JSX deben nombrarse como componentes. |
|
|
@@ -507,27 +507,58 @@ valor del guard y `Result.err` vienen de `@skapxd/result`. Por eso funciona con
|
|
|
507
507
|
aliases, re-exports y tipos inferidos, sin depender solo del nombre importado en
|
|
508
508
|
el archivo.
|
|
509
509
|
|
|
510
|
-
### `skapxd/await-requires-
|
|
510
|
+
### `skapxd/await-requires-result`
|
|
511
511
|
|
|
512
512
|
> La activa el preset `shared.frontend` en todo el front: componentes, hooks,
|
|
513
513
|
> handlers y servicios. El contrato queda así: ninguna función está obligada
|
|
514
|
-
> a retornar `Result`, pero
|
|
515
|
-
>
|
|
516
|
-
> en otros globs, añádela tú mismo:
|
|
514
|
+
> a retornar `Result`, pero todo `await` debe **resolver** en uno. Para
|
|
515
|
+
> activarla en otros globs, añádela tú mismo:
|
|
517
516
|
>
|
|
518
517
|
> ```js
|
|
519
518
|
> rules: {
|
|
520
|
-
> "skapxd/await-requires-
|
|
519
|
+
> "skapxd/await-requires-result": ["error", {
|
|
521
520
|
> trySafeCallNames: ["trySafe"],
|
|
522
521
|
> allowFilePatterns: [],
|
|
523
522
|
> }],
|
|
524
523
|
> }
|
|
525
524
|
> ```
|
|
525
|
+
>
|
|
526
|
+
> (`skapxd/await-requires-try-safe` es el nombre anterior; sigue funcionando
|
|
527
|
+
> como alias deprecado y se eliminará en una versión futura.)
|
|
528
|
+
|
|
529
|
+
Hay dos caminos válidos, y la regla recomienda el primero:
|
|
530
|
+
|
|
531
|
+
**1. El camino preferido: extrae la operación a una función que retorne
|
|
532
|
+
`Promise<Result<...>>`** y modela ahí los errores de dominio. El `trySafe` vive
|
|
533
|
+
dentro de esa función, en la frontera con el código que lanza, y el resto del
|
|
534
|
+
código habla en errores con significado:
|
|
535
|
+
|
|
536
|
+
```ts
|
|
537
|
+
async function getUser(id: string): Promise<Result<User, UserError>> {
|
|
538
|
+
const response = await trySafe(() => fetch(`/users/${id}`));
|
|
539
|
+
|
|
540
|
+
if (!response.ok) {
|
|
541
|
+
return Result.err({
|
|
542
|
+
cause: response.error,
|
|
543
|
+
message: "No pude cargar el usuario.",
|
|
544
|
+
type: "USER_FETCH_FAILED",
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
return trySafe(() => response.value.json());
|
|
549
|
+
}
|
|
526
550
|
|
|
527
|
-
|
|
551
|
+
// En el componente: ya resuelve en Result, pasa directo.
|
|
552
|
+
const user = await getUser(id); // ✅
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
La detección es type-aware: la regla resuelve el símbolo hasta `@skapxd/result`,
|
|
556
|
+
así que un `Result` casero (homónimo, de otra librería) no exime.
|
|
557
|
+
|
|
558
|
+
**2. La alternativa rápida: envuelve el `await` en `trySafe` ahí mismo:**
|
|
528
559
|
|
|
529
560
|
```ts
|
|
530
|
-
const result = await trySafe(() => client.execute({...}));
|
|
561
|
+
const result = await trySafe(() => client.execute({...})); // ✅
|
|
531
562
|
```
|
|
532
563
|
|
|
533
564
|
o dentro de un callback:
|
|
@@ -539,18 +570,9 @@ const result = await trySafe(async () => {
|
|
|
539
570
|
});
|
|
540
571
|
```
|
|
541
572
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
```ts
|
|
547
|
-
declare function getUser(): Promise<Result<User, Error>>;
|
|
548
|
-
|
|
549
|
-
const result = await getUser(); // ✅ ya es un Result, no necesita trySafe
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
Esta exención es type-aware: un `Result` casero (que no venga de
|
|
553
|
-
`@skapxd/result`) no exime.
|
|
573
|
+
Sirve para código de pegamento, pero deja el error sin modelar (`Result<T,
|
|
574
|
+
unknown>`). Cuando la misma operación se repite o el error importa, el mensaje
|
|
575
|
+
de la regla empuja hacia el camino 1.
|
|
554
576
|
|
|
555
577
|
### `skapxd/max-hook-size`
|
|
556
578
|
|
|
@@ -629,7 +651,7 @@ if (!result.ok) return Result.err({ cause: result.error, type: "DB_FAILED" });
|
|
|
629
651
|
```
|
|
630
652
|
|
|
631
653
|
Se complementa con `result-error-requires-cause` (preservar la causa) y, si la
|
|
632
|
-
activas, con `await-requires-
|
|
654
|
+
activas, con `await-requires-result` (que además exige que cada `await` resuelva en un `Result`).
|
|
633
655
|
|
|
634
656
|
### `skapxd/no-promise-chain`
|
|
635
657
|
|
|
@@ -702,7 +724,7 @@ cierran el hueco.
|
|
|
702
724
|
|
|
703
725
|
En cambio, las reglas atadas a `@skapxd/result`
|
|
704
726
|
(`async-functions-return-result`, `result-error-requires-cause`,
|
|
705
|
-
`await-requires-
|
|
727
|
+
`await-requires-result`) **no** dependen de nombres: resuelven el símbolo hasta
|
|
706
728
|
el paquete real (vía el `name` de su `package.json`), así que funcionan con
|
|
707
729
|
alias, re-exports y en monorepos.
|
|
708
730
|
|
package/dist/astro/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
baseRules,
|
|
3
3
|
createBaseLanguageOptions,
|
|
4
4
|
createTypedLanguageOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NYLQRBBK.mjs";
|
|
6
6
|
|
|
7
7
|
// src/astro/configs.ts
|
|
8
8
|
function createAstroConfigs(pluginReference) {
|
|
@@ -39,4 +39,4 @@ function createAstroConfigs(pluginReference) {
|
|
|
39
39
|
export {
|
|
40
40
|
createAstroConfigs
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-3XDQN6ZH.mjs.map
|
|
@@ -62,10 +62,11 @@ function createSharedConfigs(pluginReference) {
|
|
|
62
62
|
plugins: { skapxd: pluginReference },
|
|
63
63
|
rules: {
|
|
64
64
|
...baseRules,
|
|
65
|
-
// En el front no se obliga a retornar Result, pero
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
|
|
65
|
+
// En el front no se obliga a retornar Result, pero todo await debe
|
|
66
|
+
// resolver en uno: o la función llamada ya retorna Promise<Result>
|
|
67
|
+
// (camino preferido: errores modelados en el dominio) o se envuelve
|
|
68
|
+
// en trySafe en el sitio.
|
|
69
|
+
"skapxd/await-requires-result": "error",
|
|
69
70
|
"skapxd/jsx-return-name-pascal-case": "error",
|
|
70
71
|
"skapxd/no-functions-inside-components": "error",
|
|
71
72
|
"skapxd/no-jsx-ternary-null": "error",
|
|
@@ -104,4 +105,4 @@ export {
|
|
|
104
105
|
createSharedConfigs,
|
|
105
106
|
strictConfig
|
|
106
107
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
108
|
+
//# sourceMappingURL=chunk-NYLQRBBK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shared/configs/create-typed-language-options.ts","../src/shared/configs/base-rules.ts","../src/shared/configs/create-base-language-options.ts","../src/shared/configs/create-shared-configs.ts","../src/shared/configs/strict-config.ts"],"sourcesContent":["import tseslint from \"typescript-eslint\";\n\nexport function createTypedLanguageOptions() {\n return {\n // Sin el parser explícito, un consumidor que use solo estos presets\n // obtiene \"Parsing error\" en cada archivo TS (espree no parsea TS).\n parser: tseslint.parser,\n parserOptions: {\n projectService: true,\n },\n };\n}\n","export const baseRules = {\n \"skapxd/no-ad-hoc-ok-result\": \"error\",\n \"skapxd/no-deep-relative-imports\": \"error\",\n \"skapxd/no-promise-chain\": \"error\",\n \"skapxd/no-try-catch\": \"error\",\n \"skapxd/one-root-function-per-file\": \"error\",\n \"skapxd/prefer-ts-pattern\": \"error\",\n \"skapxd/result-error-requires-cause\": \"error\",\n};\n","import tseslint from \"typescript-eslint\";\n\n// Variante sin type-checking: solo el parser, para presets que aplican a TS\n// pero no necesitan projectService (base, package, next/base, next/react).\nexport function createBaseLanguageOptions() {\n return {\n parser: tseslint.parser,\n };\n}\n","import { baseRules } from \"./base-rules\";\nimport { createBaseLanguageOptions } from \"./create-base-language-options\";\nimport { createTypedLanguageOptions } from \"./create-typed-language-options\";\n\nexport function createSharedConfigs(pluginReference: unknown) {\n const baseLanguageOptions = createBaseLanguageOptions();\n const typedLanguageOptions = createTypedLanguageOptions();\n\n return {\n backend: {\n languageOptions: typedLanguageOptions,\n name: \"skapxd/shared/backend\",\n plugins: { skapxd: pluginReference },\n rules: {\n ...baseRules,\n \"skapxd/async-functions-return-result\": [\n \"error\",\n {\n checkMissingReturnType: true,\n resultTypeNames: [\"Result\", \"ResultValue\", \"SafeResult\"],\n },\n ],\n },\n },\n base: {\n languageOptions: baseLanguageOptions,\n name: \"skapxd/shared/base\",\n plugins: { skapxd: pluginReference },\n rules: baseRules,\n },\n frontend: {\n languageOptions: typedLanguageOptions,\n name: \"skapxd/shared/frontend\",\n plugins: { skapxd: pluginReference },\n rules: {\n ...baseRules,\n // En el front no se obliga a retornar Result, pero
|
|
1
|
+
{"version":3,"sources":["../src/shared/configs/create-typed-language-options.ts","../src/shared/configs/base-rules.ts","../src/shared/configs/create-base-language-options.ts","../src/shared/configs/create-shared-configs.ts","../src/shared/configs/strict-config.ts"],"sourcesContent":["import tseslint from \"typescript-eslint\";\n\nexport function createTypedLanguageOptions() {\n return {\n // Sin el parser explícito, un consumidor que use solo estos presets\n // obtiene \"Parsing error\" en cada archivo TS (espree no parsea TS).\n parser: tseslint.parser,\n parserOptions: {\n projectService: true,\n },\n };\n}\n","export const baseRules = {\n \"skapxd/no-ad-hoc-ok-result\": \"error\",\n \"skapxd/no-deep-relative-imports\": \"error\",\n \"skapxd/no-promise-chain\": \"error\",\n \"skapxd/no-try-catch\": \"error\",\n \"skapxd/one-root-function-per-file\": \"error\",\n \"skapxd/prefer-ts-pattern\": \"error\",\n \"skapxd/result-error-requires-cause\": \"error\",\n};\n","import tseslint from \"typescript-eslint\";\n\n// Variante sin type-checking: solo el parser, para presets que aplican a TS\n// pero no necesitan projectService (base, package, next/base, next/react).\nexport function createBaseLanguageOptions() {\n return {\n parser: tseslint.parser,\n };\n}\n","import { baseRules } from \"./base-rules\";\nimport { createBaseLanguageOptions } from \"./create-base-language-options\";\nimport { createTypedLanguageOptions } from \"./create-typed-language-options\";\n\nexport function createSharedConfigs(pluginReference: unknown) {\n const baseLanguageOptions = createBaseLanguageOptions();\n const typedLanguageOptions = createTypedLanguageOptions();\n\n return {\n backend: {\n languageOptions: typedLanguageOptions,\n name: \"skapxd/shared/backend\",\n plugins: { skapxd: pluginReference },\n rules: {\n ...baseRules,\n \"skapxd/async-functions-return-result\": [\n \"error\",\n {\n checkMissingReturnType: true,\n resultTypeNames: [\"Result\", \"ResultValue\", \"SafeResult\"],\n },\n ],\n },\n },\n base: {\n languageOptions: baseLanguageOptions,\n name: \"skapxd/shared/base\",\n plugins: { skapxd: pluginReference },\n rules: baseRules,\n },\n frontend: {\n languageOptions: typedLanguageOptions,\n name: \"skapxd/shared/frontend\",\n plugins: { skapxd: pluginReference },\n rules: {\n ...baseRules,\n // En el front no se obliga a retornar Result, pero todo await debe\n // resolver en uno: o la función llamada ya retorna Promise<Result>\n // (camino preferido: errores modelados en el dominio) o se envuelve\n // en trySafe en el sitio.\n \"skapxd/await-requires-result\": \"error\",\n \"skapxd/jsx-return-name-pascal-case\": \"error\",\n \"skapxd/no-functions-inside-components\": \"error\",\n \"skapxd/no-jsx-ternary-null\": \"error\",\n \"skapxd/max-hook-size\": [\n \"error\",\n {\n maxLines: 120,\n maxUseState: 1,\n },\n ],\n },\n },\n package: {\n languageOptions: baseLanguageOptions,\n name: \"skapxd/shared/package\",\n plugins: { skapxd: pluginReference },\n rules: {\n \"skapxd/one-root-function-per-file\": \"error\",\n },\n },\n };\n}\n","// Config endurecida: ignora TODOS los comentarios `eslint-disable` (y demás\n// directivas inline) en los archivos que cubre. Así ni una persona ni un agente\n// pueden saltarse una regla con `// eslint-disable-next-line`.\nexport const strictConfig = {\n linterOptions: {\n noInlineConfig: true,\n },\n name: \"skapxd/strict\",\n};\n"],"mappings":";AAAA,OAAO,cAAc;AAEd,SAAS,6BAA6B;AAC3C,SAAO;AAAA;AAAA;AAAA,IAGL,QAAQ,SAAS;AAAA,IACjB,eAAe;AAAA,MACb,gBAAgB;AAAA,IAClB;AAAA,EACF;AACF;;;ACXO,IAAM,YAAY;AAAA,EACvB,8BAA8B;AAAA,EAC9B,mCAAmC;AAAA,EACnC,2BAA2B;AAAA,EAC3B,uBAAuB;AAAA,EACvB,qCAAqC;AAAA,EACrC,4BAA4B;AAAA,EAC5B,sCAAsC;AACxC;;;ACRA,OAAOA,eAAc;AAId,SAAS,4BAA4B;AAC1C,SAAO;AAAA,IACL,QAAQA,UAAS;AAAA,EACnB;AACF;;;ACJO,SAAS,oBAAoB,iBAA0B;AAC5D,QAAM,sBAAsB,0BAA0B;AACtD,QAAM,uBAAuB,2BAA2B;AAExD,SAAO;AAAA,IACL,SAAS;AAAA,MACP,iBAAiB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,QACL,GAAG;AAAA,QACH,wCAAwC;AAAA,UACtC;AAAA,UACA;AAAA,YACE,wBAAwB;AAAA,YACxB,iBAAiB,CAAC,UAAU,eAAe,YAAY;AAAA,UACzD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,iBAAiB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IACA,UAAU;AAAA,MACR,iBAAiB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,QACL,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,QAKH,gCAAgC;AAAA,QAChC,sCAAsC;AAAA,QACtC,yCAAyC;AAAA,QACzC,8BAA8B;AAAA,QAC9B,wBAAwB;AAAA,UACtB;AAAA,UACA;AAAA,YACE,UAAU;AAAA,YACV,aAAa;AAAA,UACf;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,iBAAiB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,QACL,qCAAqC;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AACF;;;AC3DO,IAAM,eAAe;AAAA,EAC1B,eAAe;AAAA,IACb,gBAAgB;AAAA,EAClB;AAAA,EACA,MAAM;AACR;","names":["tseslint"]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
baseRules,
|
|
3
3
|
createBaseLanguageOptions,
|
|
4
4
|
createTypedLanguageOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NYLQRBBK.mjs";
|
|
6
6
|
|
|
7
7
|
// src/next/configs.ts
|
|
8
8
|
function createNextConfigs(pluginReference) {
|
|
@@ -63,4 +63,4 @@ function createNextConfigs(pluginReference) {
|
|
|
63
63
|
export {
|
|
64
64
|
createNextConfigs
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-OQLKVDGZ.mjs.map
|
|
@@ -807,8 +807,8 @@ var noAdHocOkResult = {
|
|
|
807
807
|
}
|
|
808
808
|
};
|
|
809
809
|
|
|
810
|
-
// src/utils/get-await-requires-
|
|
811
|
-
function
|
|
810
|
+
// src/utils/get-await-requires-result-options.ts
|
|
811
|
+
function getAwaitRequiresResultOptions(options = {}) {
|
|
812
812
|
return {
|
|
813
813
|
allowFilePatterns: options.allowFilePatterns ?? [],
|
|
814
814
|
trySafeCallNames: options.trySafeCallNames ?? ["trySafe"]
|
|
@@ -895,15 +895,15 @@ function isTrySafeCall(node, trySafeCallNames) {
|
|
|
895
895
|
return node?.type === "CallExpression" && isCalleeNamed(node.callee, trySafeCallNames);
|
|
896
896
|
}
|
|
897
897
|
|
|
898
|
-
// src/rules/await-requires-
|
|
899
|
-
var
|
|
898
|
+
// src/rules/await-requires-result.ts
|
|
899
|
+
var awaitRequiresResult = {
|
|
900
900
|
meta: {
|
|
901
901
|
type: "problem",
|
|
902
902
|
docs: {
|
|
903
|
-
description: "Exige que
|
|
903
|
+
description: "Exige que todo await resuelva en un Result: una funcion que retorne Promise<Result<...>> o trySafe en el sitio."
|
|
904
904
|
},
|
|
905
905
|
messages: {
|
|
906
|
-
|
|
906
|
+
awaitWithoutResult: "El await dentro de `{{name}}` no resuelve en un Result. Mejor opcion: extrae la operacion a una funcion que retorne Promise<Result<...>> y modela ahi los errores de dominio (el trySafe vive dentro de esa funcion). Alternativa: envuelvela aqui mismo: `{{suggestion}}`."
|
|
907
907
|
},
|
|
908
908
|
schema: [
|
|
909
909
|
{
|
|
@@ -923,7 +923,7 @@ var awaitRequiresTrySafe = {
|
|
|
923
923
|
]
|
|
924
924
|
},
|
|
925
925
|
create(context) {
|
|
926
|
-
const options =
|
|
926
|
+
const options = getAwaitRequiresResultOptions(context.options[0]);
|
|
927
927
|
const filename = context.filename ?? context.getFilename();
|
|
928
928
|
const sourceCode = context.sourceCode ?? context.getSourceCode();
|
|
929
929
|
const typeContext = getTypeContext(context);
|
|
@@ -958,7 +958,7 @@ var awaitRequiresTrySafe = {
|
|
|
958
958
|
name: getAwaitScopeName(node),
|
|
959
959
|
suggestion: getTrySafeAwaitSuggestion(node.argument, sourceCode)
|
|
960
960
|
},
|
|
961
|
-
messageId: "
|
|
961
|
+
messageId: "awaitWithoutResult",
|
|
962
962
|
node
|
|
963
963
|
});
|
|
964
964
|
}
|
|
@@ -1533,7 +1533,16 @@ var rules = {
|
|
|
1533
1533
|
"jsx-return-name-pascal-case": jsxReturnNamePascalCase,
|
|
1534
1534
|
"async-functions-return-result": asyncFunctionsReturnResult,
|
|
1535
1535
|
"no-ad-hoc-ok-result": noAdHocOkResult,
|
|
1536
|
-
"await-requires-
|
|
1536
|
+
"await-requires-result": awaitRequiresResult,
|
|
1537
|
+
// Alias deprecado del nombre anterior; se elimina en una versión futura.
|
|
1538
|
+
"await-requires-try-safe": {
|
|
1539
|
+
...awaitRequiresResult,
|
|
1540
|
+
meta: {
|
|
1541
|
+
...awaitRequiresResult.meta,
|
|
1542
|
+
deprecated: true,
|
|
1543
|
+
replacedBy: ["skapxd/await-requires-result"]
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1537
1546
|
"result-error-requires-cause": resultErrorRequiresCause,
|
|
1538
1547
|
"max-hook-size": maxHookSize,
|
|
1539
1548
|
"no-deep-relative-imports": noDeepRelativeImports,
|
|
@@ -1547,4 +1556,4 @@ var rules = {
|
|
|
1547
1556
|
export {
|
|
1548
1557
|
rules
|
|
1549
1558
|
};
|
|
1550
|
-
//# sourceMappingURL=chunk-
|
|
1559
|
+
//# sourceMappingURL=chunk-OYVXAPDZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/get-file-name.ts","../src/utils/get-source-extension.ts","../src/utils/get-directory-name.ts","../src/utils/is-http-route-method.ts","../src/utils/to-kebab-case.ts","../src/utils/get-suggested-helper-file-name.ts","../src/utils/get-path-parts.ts","../src/utils/is-in-source-root.ts","../src/utils/is-inside-app-directory.ts","../src/constants/next-app-metadata-file-stems.ts","../src/constants/next-app-route-segment-file-stems.ts","../src/constants/next-project-root-file-stems.ts","../src/utils/is-next-convention-file.ts","../src/utils/get-suggested-helper-path.ts","../src/utils/get-move-suggestion.ts","../src/utils/get-function-node-name.ts","../src/utils/get-variable-declarator-name.ts","../src/utils/is-function-node.ts","../src/utils/get-root-function-entries.ts","../src/utils/get-suggested-helper-file-names.ts","../src/utils/get-tree-child-lines.ts","../src/utils/get-structure-suggestion.ts","../src/rules/one-root-function-per-file.ts","../src/utils/is-ast-node.ts","../src/utils/get-node-children.ts","../src/utils/contains-jsx.ts","../src/utils/contains-own-jsx.ts","../src/utils/function-returns-jsx.ts","../src/utils/is-pascal-case-name.ts","../src/utils/to-pascal-case.ts","../src/rules/jsx-return-name-pascal-case.ts","../src/utils/is-member-property-named.ts","../src/utils/is-callee-named.ts","../src/utils/contains-call-named.ts","../src/utils/get-async-result-rule-options.ts","../src/utils/get-property-name.ts","../src/utils/get-parent-function-name.ts","../src/utils/get-function-expression-name.ts","../src/utils/get-parent-function-report-node.ts","../src/utils/get-type-context.ts","../src/utils/is-anonymous-generated-function-name.ts","../src/utils/get-type-reference-parameters.ts","../src/utils/is-type-reference-named.ts","../src/utils/is-promise-of-result-type.ts","../src/utils/get-package-name.ts","../src/utils/is-skapxd-result-source-file.ts","../src/utils/resolve-alias-symbol.ts","../src/utils/is-symbol-from-skapxd-result.ts","../src/utils/is-skapxd-named-type.ts","../src/utils/is-skapxd-result-type.ts","../src/utils/is-skapxd-result-or-promise-result-type.ts","../src/utils/matches-any-pattern.ts","../src/rules/async-functions-return-result.ts","../src/utils/get-containing-function.ts","../src/utils/get-function-name.ts","../src/utils/get-returned-object-expression.ts","../src/utils/unwrap-expression.ts","../src/utils/get-boolean-literal-value.ts","../src/utils/is-property-key-named.ts","../src/utils/has-boolean-ok-property.ts","../src/utils/is-exported-function.ts","../src/rules/no-ad-hoc-ok-result.ts","../src/utils/get-await-requires-result-options.ts","../src/utils/get-await-scope-name.ts","../src/utils/get-enclosing-try-safe-call.ts","../src/utils/contains-await-expression.ts","../src/utils/get-call-expression-example.ts","../src/utils/get-awaited-operation-example.ts","../src/utils/get-try-safe-await-suggestion.ts","../src/utils/is-skapxd-result-or-promise-result-expression.ts","../src/utils/is-try-safe-call.ts","../src/rules/await-requires-result.ts","../src/utils/get-ok-member-object.ts","../src/utils/is-failed-ok-comparison.ts","../src/utils/get-failed-result-binary-guard-name.ts","../src/utils/get-result-check-argument.ts","../src/utils/get-failed-result-guard.ts","../src/utils/is-result-err-call.ts","../src/utils/get-own-result-err-calls.ts","../src/utils/get-function-return-type.ts","../src/utils/function-returns-skapxd-result-type.ts","../src/utils/is-inside-skapxd-result-returning-function.ts","../src/utils/is-skapxd-result-err-call.ts","../src/utils/is-skapxd-result-expression.ts","../src/utils/is-result-error-member.ts","../src/utils/result-err-preserves-cause.ts","../src/rules/result-error-requires-cause.ts","../src/utils/count-own-use-state-calls-in-node.ts","../src/utils/count-own-use-state-calls.ts","../src/utils/get-function-line-count.ts","../src/utils/get-max-hook-size-options.ts","../src/utils/is-hook-name.ts","../src/rules/max-hook-size.ts","../src/utils/count-parent-segments.ts","../src/rules/no-deep-relative-imports.ts","../src/rules/no-functions-inside-components.ts","../src/rules/no-try-catch.ts","../src/rules/prefer-ts-pattern.ts","../src/rules/no-jsx-ternary-null.ts","../src/utils/is-promise-type.ts","../src/rules/no-promise-chain.ts","../src/shared/rules.ts"],"sourcesContent":["// @ts-nocheck\nexport function getFileName(filename) {\n return filename.split(/[\\\\/]/).at(-1) ?? filename;\n}\n","// @ts-nocheck\nexport function getSourceExtension(fileName) {\n return fileName.endsWith(\".tsx\") ? \".tsx\" : \".ts\";\n}\n","// @ts-nocheck\nexport function getDirectoryName(filename) {\n return filename.split(/[\\\\/]/).slice(0, -1).join(\"/\");\n}\n","// @ts-nocheck\nexport function isHttpRouteMethod(functionName) {\n return [\"DELETE\", \"GET\", \"HEAD\", \"OPTIONS\", \"PATCH\", \"POST\", \"PUT\"].includes(\n functionName,\n );\n}\n","// @ts-nocheck\nexport function toKebabCase(value) {\n return value\n .replace(/OEmbed/g, \"Oembed\")\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .replace(/([A-Z]+)([A-Z][a-z])/g, \"$1-$2\")\n .replace(/[^a-zA-Z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\")\n .toLocaleLowerCase();\n}\n","// @ts-nocheck\nimport { isHttpRouteMethod } from \"./is-http-route-method\";\nimport { toKebabCase } from \"./to-kebab-case\";\n\nexport function getSuggestedHelperFileName({ extension, fileStem, functionName }) {\n const helperFunctionName =\n fileStem === \"route\" && isHttpRouteMethod(functionName)\n ? `handle${functionName}`\n : functionName;\n\n return `${toKebabCase(helperFunctionName)}${extension}`;\n}\n","// @ts-nocheck\nexport function getPathParts(filename) {\n return filename.split(/[\\\\/]/).filter(Boolean);\n}\n","// @ts-nocheck\nimport { getPathParts } from \"./get-path-parts\";\n\nexport function isInSourceRoot(filename) {\n const pathParts = getPathParts(filename);\n return pathParts.at(-2) === \"src\";\n}\n","// @ts-nocheck\nimport { getPathParts } from \"./get-path-parts\";\n\nexport function isInsideAppDirectory(filename) {\n return getPathParts(filename).includes(\"app\");\n}\n","// @ts-nocheck\nexport const nextAppMetadataFileStems = [\n \"apple-icon\",\n \"icon\",\n \"manifest\",\n \"opengraph-image\",\n \"robots\",\n \"sitemap\",\n \"twitter-image\",\n];\n","// @ts-nocheck\nexport const nextAppRouteSegmentFileStems = [\n \"default\",\n \"error\",\n \"forbidden\",\n \"global-error\",\n \"global-not-found\",\n \"layout\",\n \"loading\",\n \"not-found\",\n \"page\",\n \"route\",\n \"template\",\n \"unauthorized\",\n];\n","// @ts-nocheck\nexport const nextProjectRootFileStems = [\n \"instrumentation\",\n \"instrumentation-client\",\n \"mdx-components\",\n \"proxy\",\n];\n","// @ts-nocheck\nimport { isInSourceRoot } from \"./is-in-source-root\";\nimport { isInsideAppDirectory } from \"./is-inside-app-directory\";\nimport { nextAppMetadataFileStems } from \"#/constants/next-app-metadata-file-stems\";\nimport { nextAppRouteSegmentFileStems } from \"#/constants/next-app-route-segment-file-stems\";\nimport { nextProjectRootFileStems } from \"#/constants/next-project-root-file-stems\";\n\nexport function isNextConventionFile({ fileStem, filename }) {\n if (\n [\n ...nextAppRouteSegmentFileStems,\n ...nextAppMetadataFileStems,\n ].includes(fileStem)\n ) {\n return isInsideAppDirectory(filename);\n }\n\n if (nextProjectRootFileStems.includes(fileStem)) {\n return isInSourceRoot(filename);\n }\n\n return false;\n}\n","// @ts-nocheck\nimport { getDirectoryName } from \"./get-directory-name\";\nimport { getSuggestedHelperFileName } from \"./get-suggested-helper-file-name\";\nimport { isNextConventionFile } from \"./is-next-convention-file\";\nimport { toKebabCase } from \"./to-kebab-case\";\n\nexport function getSuggestedHelperPath({ extension, fileStem, filename, functionName }) {\n const helperFileName = getSuggestedHelperFileName({\n extension,\n fileStem,\n functionName,\n });\n\n if (isNextConventionFile({ fileStem, filename })) {\n return `${getDirectoryName(filename)}/${helperFileName}`;\n }\n\n return `${getDirectoryName(filename)}/${toKebabCase(fileStem)}/${helperFileName}`;\n}\n","// @ts-nocheck\nimport { getFileName } from \"./get-file-name\";\nimport { getSourceExtension } from \"./get-source-extension\";\nimport { getSuggestedHelperPath } from \"./get-suggested-helper-path\";\nimport { isHttpRouteMethod } from \"./is-http-route-method\";\nimport { isNextConventionFile } from \"./is-next-convention-file\";\n\nexport function getMoveSuggestion({ filename, functionName }) {\n const fileName = getFileName(filename);\n const extension = getSourceExtension(fileName);\n const fileStem = fileName.slice(0, -extension.length);\n const suggestedPath = getSuggestedHelperPath({\n extension,\n fileStem,\n filename,\n functionName,\n });\n\n if (fileStem === \"route\" && isHttpRouteMethod(functionName)) {\n return `Mueve la implementacion de \\`${functionName}\\` a \\`${suggestedPath}\\` si solo se usa aqui y deja \\`${functionName}\\` en route.ts delegando a ese helper. No conviertas route.ts en route/index.ts porque Next no lo reconoce.`;\n }\n\n if (isNextConventionFile({ fileStem, filename })) {\n return `Mueve \\`${functionName}\\` a \\`${suggestedPath}\\` si solo se usa aqui y deja \\`${fileName}\\` como entrypoint de Next. No conviertas \\`${fileName}\\` en \\`${fileStem}/index${extension}\\` porque Next exige el nombre exacto del archivo.`;\n }\n\n return `Mueve \\`${functionName}\\` a \\`${suggestedPath}\\` si solo se usa aqui.`;\n}\n","// @ts-nocheck\nexport function getFunctionNodeName(node) {\n return node.id?.name ?? \"helper\";\n}\n","// @ts-nocheck\nimport { getFunctionNodeName } from \"./get-function-node-name\";\n\nexport function getVariableDeclaratorName(variableDeclarator) {\n return variableDeclarator.id.type === \"Identifier\"\n ? variableDeclarator.id.name\n : getFunctionNodeName(variableDeclarator.init);\n}\n","// @ts-nocheck\nexport function isFunctionNode(node) {\n return (\n node?.type === \"FunctionDeclaration\" ||\n node?.type === \"FunctionExpression\" ||\n node?.type === \"ArrowFunctionExpression\"\n );\n}\n","// @ts-nocheck\nimport { getFunctionNodeName } from \"./get-function-node-name\";\nimport { getVariableDeclaratorName } from \"./get-variable-declarator-name\";\nimport { isFunctionNode } from \"./is-function-node\";\n\nexport function getRootFunctionEntries(statement) {\n const declaration =\n statement.type === \"ExportNamedDeclaration\" ||\n statement.type === \"ExportDefaultDeclaration\"\n ? statement.declaration\n : statement;\n\n if (!declaration) {\n return [];\n }\n\n if (isFunctionNode(declaration)) {\n return [\n {\n name: getFunctionNodeName(declaration),\n node: declaration,\n },\n ];\n }\n\n if (declaration.type !== \"VariableDeclaration\") {\n return [];\n }\n\n return declaration.declarations\n .filter((variableDeclarator) => isFunctionNode(variableDeclarator.init))\n .map((variableDeclarator) => ({\n name: getVariableDeclaratorName(variableDeclarator),\n node: variableDeclarator.init,\n }));\n}\n","// @ts-nocheck\nimport { getSuggestedHelperFileName } from \"./get-suggested-helper-file-name\";\n\nexport function getSuggestedHelperFileNames({ extension, fileStem, functionNames }) {\n return [\n ...new Set(\n functionNames.map((functionName) =>\n getSuggestedHelperFileName({\n extension,\n fileStem,\n functionName,\n }),\n ),\n ),\n ];\n}\n","// @ts-nocheck\nexport function getTreeChildLines({ indent = \"\", names }) {\n return names.map((name, index) => {\n const branch = index === names.length - 1 ? \"└──\" : \"├──\";\n\n return `${indent}${branch} ${name}`;\n });\n}\n","// @ts-nocheck\nimport { getDirectoryName } from \"./get-directory-name\";\nimport { getFileName } from \"./get-file-name\";\nimport { getSourceExtension } from \"./get-source-extension\";\nimport { getSuggestedHelperFileNames } from \"./get-suggested-helper-file-names\";\nimport { getTreeChildLines } from \"./get-tree-child-lines\";\nimport { isNextConventionFile } from \"./is-next-convention-file\";\nimport { toKebabCase } from \"./to-kebab-case\";\n\nexport function getStructureSuggestion({ filename, functionNames }) {\n const fileName = getFileName(filename);\n const extension = getSourceExtension(fileName);\n const fileStem = fileName.slice(0, -extension.length);\n const directoryName = getDirectoryName(filename);\n const helperFileNames = getSuggestedHelperFileNames({\n extension,\n fileStem,\n functionNames,\n });\n\n if (isNextConventionFile({ fileStem, filename })) {\n return [\n `${directoryName}/`,\n ...getTreeChildLines({\n names: [fileName, ...helperFileNames],\n }),\n ].join(\"\\n\");\n }\n\n return [\n `${directoryName}/${toKebabCase(fileStem)}/`,\n ...getTreeChildLines({\n names: [`index${extension}`, ...helperFileNames],\n }),\n ].join(\"\\n\");\n}\n","// @ts-nocheck\nimport { getMoveSuggestion } from \"#/utils/get-move-suggestion\";\nimport { getRootFunctionEntries } from \"#/utils/get-root-function-entries\";\nimport { getStructureSuggestion } from \"#/utils/get-structure-suggestion\";\n\nexport const oneRootFunctionPerFile = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Limita cada archivo a una sola funcion declarada en la raiz.\",\n },\n messages: {\n tooManyRootFunctions:\n \"Este archivo tiene {{count}} funciones en la raiz. Deja solo una funcion top-level por archivo. {{moveSuggestion}}\\n\\nEstructura sugerida:\\n{{structureSuggestion}}\\n\\nSi se reutiliza, muevela a un modulo compartido con nombre de dominio.\",\n },\n schema: [],\n },\n create(context) {\n return {\n Program(node) {\n const rootFunctions = node.body.flatMap((statement) =>\n getRootFunctionEntries(statement),\n );\n\n if (rootFunctions.length <= 1) {\n return;\n }\n\n const firstHelper = rootFunctions[1];\n const helperFunctionNames = rootFunctions\n .slice(1)\n .map((rootFunction) => rootFunction.name);\n\n context.report({\n data: {\n count: String(rootFunctions.length),\n moveSuggestion: getMoveSuggestion({\n filename: context.filename ?? context.getFilename(),\n functionName: firstHelper.name,\n }),\n structureSuggestion: getStructureSuggestion({\n filename: context.filename ?? context.getFilename(),\n functionNames: helperFunctionNames,\n }),\n },\n messageId: \"tooManyRootFunctions\",\n node: firstHelper.node,\n });\n },\n };\n },\n };\n","// @ts-nocheck\nexport function isAstNode(value) {\n return Boolean(value && typeof value === \"object\" && \"type\" in value);\n}\n","// @ts-nocheck\nimport { isAstNode } from \"./is-ast-node\";\n\nexport function getNodeChildren(node) {\n return Object.entries(node).flatMap(([key, value]) => {\n if ([\"parent\", \"loc\", \"range\", \"tokens\", \"comments\"].includes(key)) {\n return [];\n }\n\n if (Array.isArray(value)) {\n return value.filter(isAstNode);\n }\n\n return isAstNode(value) ? [value] : [];\n });\n}\n","// @ts-nocheck\nimport { getNodeChildren } from \"./get-node-children\";\nimport { isAstNode } from \"./is-ast-node\";\n\nexport function containsJsx(node) {\n if (!isAstNode(node)) {\n return false;\n }\n\n if (node.type === \"JSXElement\" || node.type === \"JSXFragment\") {\n return true;\n }\n\n return getNodeChildren(node).some((child) => containsJsx(child));\n}\n","// @ts-nocheck\nimport { getNodeChildren } from \"./get-node-children\";\nimport { isAstNode } from \"./is-ast-node\";\nimport { isFunctionNode } from \"./is-function-node\";\n\nexport function containsOwnJsx(node) {\n if (!isAstNode(node)) {\n return false;\n }\n\n if (node.type === \"JSXElement\" || node.type === \"JSXFragment\") {\n return true;\n }\n\n if (isFunctionNode(node)) {\n return false;\n }\n\n return getNodeChildren(node).some((child) => containsOwnJsx(child));\n}\n","// @ts-nocheck\nimport { containsJsx } from \"./contains-jsx\";\nimport { containsOwnJsx } from \"./contains-own-jsx\";\n\nexport function functionReturnsJsx(functionNode) {\n if (functionNode.body?.type !== \"BlockStatement\") {\n return containsJsx(functionNode.body);\n }\n\n return containsOwnJsx(functionNode.body);\n}\n","// @ts-nocheck\nexport function isPascalCaseName(value) {\n return /^[A-Z][A-Za-z0-9]*$/.test(value);\n}\n","// @ts-nocheck\nexport function toPascalCase(value) {\n return value.replace(/^[a-z]/, (letter) => letter.toLocaleUpperCase());\n}\n","// @ts-nocheck\nimport { functionReturnsJsx } from \"#/utils/function-returns-jsx\";\nimport { isFunctionNode } from \"#/utils/is-function-node\";\nimport { isPascalCaseName } from \"#/utils/is-pascal-case-name\";\nimport { toPascalCase } from \"#/utils/to-pascal-case\";\n\nexport const jsxReturnNamePascalCase = {\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Exige nombres PascalCase para funciones que devuelven JSX.\",\n },\n messages: {\n invalidName:\n \"La funcion `{{name}}` devuelve JSX. Nombrala como componente, por ejemplo `{{suggestedName}}`, y usala con sintaxis JSX si aplica.\",\n },\n schema: [],\n },\n create(context) {\n function reportIfJsxReturningFunction(node, name, reportNode = node) {\n if (!name || isPascalCaseName(name) || !functionReturnsJsx(node)) {\n return;\n }\n\n context.report({\n data: {\n name,\n suggestedName: toPascalCase(name),\n },\n messageId: \"invalidName\",\n node: reportNode,\n });\n }\n\n return {\n FunctionDeclaration(node) {\n reportIfJsxReturningFunction(node, node.id?.name, node.id ?? node);\n },\n VariableDeclarator(node) {\n if (!isFunctionNode(node.init) || node.id.type !== \"Identifier\") {\n return;\n }\n\n reportIfJsxReturningFunction(node.init, node.id.name, node.id);\n },\n };\n },\n };\n","// @ts-nocheck\nexport function isMemberPropertyNamed(node, propertyName) {\n if (node.computed) {\n return node.property.type === \"Literal\" && node.property.value === propertyName;\n }\n\n return node.property.type === \"Identifier\" && node.property.name === propertyName;\n}\n","// @ts-nocheck\nimport { isMemberPropertyNamed } from \"./is-member-property-named\";\n\nexport function isCalleeNamed(node, names) {\n if (node?.type === \"Identifier\") {\n return names.includes(node.name);\n }\n\n if (node?.type === \"MemberExpression\") {\n return names.some((name) => isMemberPropertyNamed(node, name));\n }\n\n return false;\n}\n","// @ts-nocheck\nimport { getNodeChildren } from \"./get-node-children\";\nimport { isAstNode } from \"./is-ast-node\";\nimport { isCalleeNamed } from \"./is-callee-named\";\n\nexport function containsCallNamed(node, names) {\n if (!isAstNode(node)) {\n return false;\n }\n\n if (node.type === \"CallExpression\" && isCalleeNamed(node.callee, names)) {\n return true;\n }\n\n return getNodeChildren(node).some((child) => containsCallNamed(child, names));\n}\n","// @ts-nocheck\nexport function getAsyncResultRuleOptions(options = {}) {\n return {\n allowFilePatterns: options.allowFilePatterns ?? [],\n allowNamePatterns: options.allowNamePatterns ?? [],\n checkMissingReturnType: options.checkMissingReturnType ?? true,\n checkMissingReturnTypeWhenCallNames:\n options.checkMissingReturnTypeWhenCallNames ?? [],\n promiseTypeNames: options.promiseTypeNames ?? [\"Promise\"],\n requireCallNames: options.requireCallNames ?? [],\n resultTypeNames: options.resultTypeNames ?? [\"Result\"],\n };\n}\n","// @ts-nocheck\nexport function getPropertyName(node) {\n if (!node) {\n return \"anonymous\";\n }\n\n if (node.type === \"Identifier\") {\n return node.name;\n }\n\n if (node.type === \"Literal\") {\n return String(node.value);\n }\n\n return \"anonymous\";\n}\n","// @ts-nocheck\nimport { getFunctionNodeName } from \"./get-function-node-name\";\nimport { getPropertyName } from \"./get-property-name\";\nimport { getVariableDeclaratorName } from \"./get-variable-declarator-name\";\n\nexport function getParentFunctionName(node) {\n const parent = node.parent;\n\n if (parent?.type === \"VariableDeclarator\") {\n return getVariableDeclaratorName(parent);\n }\n\n if (\n parent?.type === \"Property\" ||\n parent?.type === \"MethodDefinition\" ||\n parent?.type === \"PropertyDefinition\"\n ) {\n return getPropertyName(parent.key);\n }\n\n return getFunctionNodeName(node);\n}\n","// @ts-nocheck\nimport { getParentFunctionName } from \"./get-parent-function-name\";\n\nexport function getFunctionExpressionName(node) {\n return node.id?.name ?? getParentFunctionName(node);\n}\n","// @ts-nocheck\nexport function getParentFunctionReportNode(node) {\n const parent = node.parent;\n\n if (parent?.type === \"VariableDeclarator\" && parent.id.type === \"Identifier\") {\n return parent.id;\n }\n\n if (\n parent?.type === \"Property\" ||\n parent?.type === \"MethodDefinition\" ||\n parent?.type === \"PropertyDefinition\"\n ) {\n return parent.key;\n }\n\n return node.id ?? node;\n}\n","// @ts-nocheck\nexport function getTypeContext(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode();\n const parserServices = sourceCode.parserServices;\n\n if (!parserServices?.program) {\n return null;\n }\n\n return {\n checker: parserServices.program.getTypeChecker(),\n services: parserServices,\n };\n}\n","// @ts-nocheck\nexport function isAnonymousGeneratedFunctionName(name) {\n return name === \"anonymous\" || name === \"helper\";\n}\n","// @ts-nocheck\nexport function getTypeReferenceParameters(node) {\n return node.typeArguments?.params ?? node.typeParameters?.params ?? [];\n}\n","// @ts-nocheck\nexport function isTypeReferenceNamed(node, names) {\n const typeName = node.typeName;\n\n return typeName.type === \"Identifier\" && names.includes(typeName.name);\n}\n","// @ts-nocheck\nimport { getTypeReferenceParameters } from \"./get-type-reference-parameters\";\nimport { isTypeReferenceNamed } from \"./is-type-reference-named\";\n\nexport function isPromiseOfResultType(node, options) {\n if (node.type !== \"TSTypeReference\") {\n return false;\n }\n\n if (!isTypeReferenceNamed(node, options.promiseTypeNames)) {\n return false;\n }\n\n const promiseValueType = getTypeReferenceParameters(node)[0];\n\n return Boolean(\n promiseValueType &&\n promiseValueType.type === \"TSTypeReference\" &&\n isTypeReferenceNamed(promiseValueType, options.resultTypeNames),\n );\n}\n","// @ts-nocheck\nimport { trySafe } from \"@skapxd/result\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nconst packageNameByDir = new Map();\n\n// Resuelve el `name` del package.json más cercano hacia arriba desde un archivo.\n// Robusto ante cualquier layout (node_modules, pnpm, workspace link, monorepo):\n// se basa en la identidad real del paquete, no en la forma de la ruta.\nexport function getPackageName(fileName) {\n const visited = [];\n let dir = path.dirname(fileName);\n\n while (true) {\n if (packageNameByDir.has(dir)) {\n const cached = packageNameByDir.get(dir);\n for (const visitedDir of visited) packageNameByDir.set(visitedDir, cached);\n return cached;\n }\n\n visited.push(dir);\n\n const packageJsonPath = path.join(dir, \"package.json\");\n\n if (fs.existsSync(packageJsonPath)) {\n const parsed = trySafe(() =>\n JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\")),\n );\n const name = parsed.ok ? (parsed.value.name ?? null) : null;\n for (const visitedDir of visited) packageNameByDir.set(visitedDir, name);\n return name;\n }\n\n const parent = path.dirname(dir);\n\n if (parent === dir) {\n for (const visitedDir of visited) packageNameByDir.set(visitedDir, null);\n return null;\n }\n\n dir = parent;\n }\n}\n","// @ts-nocheck\nimport { getPackageName } from \"./get-package-name\";\n\nexport function isSkapxdResultSourceFile(fileName) {\n return getPackageName(fileName) === \"@skapxd/result\";\n}\n","// @ts-nocheck\nimport ts from \"typescript\";\n\nexport function resolveAliasSymbol(symbol, typeContext) {\n return symbol.flags & ts.SymbolFlags.Alias\n ? typeContext.checker.getAliasedSymbol(symbol)\n : symbol;\n}\n","// @ts-nocheck\nimport { isSkapxdResultSourceFile } from \"./is-skapxd-result-source-file\";\nimport { resolveAliasSymbol } from \"./resolve-alias-symbol\";\n\nexport function isSymbolFromSkapxdResult(symbol, typeContext) {\n const resolvedSymbol = resolveAliasSymbol(symbol, typeContext);\n\n return (resolvedSymbol.getDeclarations() ?? []).some((declaration) =>\n isSkapxdResultSourceFile(declaration.getSourceFile().fileName),\n );\n}\n","// @ts-nocheck\nimport { isSymbolFromSkapxdResult } from \"./is-symbol-from-skapxd-result\";\n\nexport function isSkapxdNamedType(type, names, typeContext) {\n return [\n type.aliasSymbol,\n type.symbol,\n ].some((symbol) =>\n Boolean(\n symbol &&\n names.includes(symbol.getName()) &&\n isSymbolFromSkapxdResult(symbol, typeContext),\n ),\n );\n}\n","// @ts-nocheck\nimport { isSkapxdNamedType } from \"./is-skapxd-named-type\";\n\nexport function isSkapxdResultType(type, typeContext) {\n if (isSkapxdNamedType(type, [\"Result\", \"SafeResult\"], typeContext)) {\n return true;\n }\n\n if (!type.isUnion()) {\n return false;\n }\n\n const hasOk = type.types.some((part) =>\n isSkapxdNamedType(part, [\"Ok\"], typeContext),\n );\n const hasErr = type.types.some((part) =>\n isSkapxdNamedType(part, [\"Err\"], typeContext),\n );\n\n return hasOk && hasErr;\n}\n","// @ts-nocheck\nimport { isSkapxdResultType } from \"./is-skapxd-result-type\";\n\nexport function isSkapxdResultOrPromiseResultType(type, typeContext) {\n if (isSkapxdResultType(type, typeContext)) {\n return true;\n }\n\n const promisedType = typeContext.checker.getPromisedTypeOfPromise(type);\n\n return Boolean(promisedType && isSkapxdResultType(promisedType, typeContext));\n}\n","// @ts-nocheck\nexport function matchesAnyPattern(value, patterns) {\n return patterns.some((pattern) => new RegExp(pattern).test(value));\n}\n","// @ts-nocheck\nimport { containsCallNamed } from \"#/utils/contains-call-named\";\nimport { getAsyncResultRuleOptions } from \"#/utils/get-async-result-rule-options\";\nimport { getFunctionExpressionName } from \"#/utils/get-function-expression-name\";\nimport { getParentFunctionName } from \"#/utils/get-parent-function-name\";\nimport { getParentFunctionReportNode } from \"#/utils/get-parent-function-report-node\";\nimport { getTypeContext } from \"#/utils/get-type-context\";\nimport { isAnonymousGeneratedFunctionName } from \"#/utils/is-anonymous-generated-function-name\";\nimport { isPromiseOfResultType } from \"#/utils/is-promise-of-result-type\";\nimport { isSkapxdResultOrPromiseResultType } from \"#/utils/is-skapxd-result-or-promise-result-type\";\nimport { matchesAnyPattern } from \"#/utils/matches-any-pattern\";\n\nexport const asyncFunctionsReturnResult = {\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Exige Promise<Result<...>> en funciones async de dominio.\",\n },\n messages: {\n missingReturnType:\n \"La funcion async `{{name}}` debe declarar Promise<Result<...>> como tipo de retorno.\",\n invalidReturnType:\n \"La funcion async `{{name}}` debe retornar Promise<Result<...>> para modelar errores de forma explicita.\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowFilePatterns: {\n items: { type: \"string\" },\n type: \"array\",\n },\n allowNamePatterns: {\n items: { type: \"string\" },\n type: \"array\",\n },\n checkMissingReturnType: { type: \"boolean\" },\n checkMissingReturnTypeWhenCallNames: {\n items: { type: \"string\" },\n type: \"array\",\n },\n requireCallNames: {\n items: { type: \"string\" },\n type: \"array\",\n },\n promiseTypeNames: {\n items: { type: \"string\" },\n type: \"array\",\n },\n resultTypeNames: {\n items: { type: \"string\" },\n type: \"array\",\n },\n },\n type: \"object\",\n },\n ],\n },\n create(context) {\n const options = getAsyncResultRuleOptions(context.options[0]);\n const filename = context.filename ?? context.getFilename();\n const typeContext = getTypeContext(context);\n\n // Verifica que el tipo de retorno sea un Result de @skapxd/result.\n // Con información de tipos (projectService) resuelve el símbolo hasta\n // el paquete; sin ella, cae a una comprobación por nombre.\n function isSkapxdResultReturnType(annotation) {\n if (typeContext) {\n const type = typeContext.services.getTypeFromTypeNode(annotation);\n\n return isSkapxdResultOrPromiseResultType(type, typeContext);\n }\n\n return isPromiseOfResultType(annotation, options);\n }\n\n function reportIfInvalidAsyncReturn(node, name, reportNode = node) {\n if (!node.async || matchesAnyPattern(filename, options.allowFilePatterns)) {\n return;\n }\n\n const functionName = name ?? \"anonymous\";\n\n if (isAnonymousGeneratedFunctionName(functionName)) {\n return;\n }\n\n if (matchesAnyPattern(functionName, options.allowNamePatterns)) {\n return;\n }\n\n if (\n options.requireCallNames.length &&\n !containsCallNamed(node.body, options.requireCallNames)\n ) {\n return;\n }\n\n const returnType = node.returnType?.typeAnnotation;\n\n if (!returnType) {\n if (\n options.checkMissingReturnType ||\n containsCallNamed(node.body, options.checkMissingReturnTypeWhenCallNames)\n ) {\n context.report({\n data: { name: functionName },\n messageId: \"missingReturnType\",\n node: reportNode,\n });\n }\n\n return;\n }\n\n if (isSkapxdResultReturnType(returnType)) {\n return;\n }\n\n context.report({\n data: { name: functionName },\n messageId: \"invalidReturnType\",\n node: reportNode,\n });\n }\n\n return {\n ArrowFunctionExpression(node) {\n reportIfInvalidAsyncReturn(\n node,\n getParentFunctionName(node),\n getParentFunctionReportNode(node),\n );\n },\n FunctionDeclaration(node) {\n reportIfInvalidAsyncReturn(node, node.id?.name, node.id ?? node);\n },\n FunctionExpression(node) {\n reportIfInvalidAsyncReturn(\n node,\n getFunctionExpressionName(node),\n getParentFunctionReportNode(node),\n );\n },\n };\n },\n };\n","// @ts-nocheck\nimport { isFunctionNode } from \"./is-function-node\";\n\nexport function getContainingFunction(node) {\n let currentNode = node.parent;\n\n while (currentNode) {\n if (isFunctionNode(currentNode)) {\n return currentNode;\n }\n\n currentNode = currentNode.parent;\n }\n\n return null;\n}\n","// @ts-nocheck\nimport { getFunctionNodeName } from \"./get-function-node-name\";\nimport { getParentFunctionName } from \"./get-parent-function-name\";\n\nexport function getFunctionName(node) {\n if (node.type === \"FunctionDeclaration\") {\n return getFunctionNodeName(node);\n }\n\n return getParentFunctionName(node);\n}\n","// @ts-nocheck\nexport function getReturnedObjectExpression(node) {\n if (!node) {\n return null;\n }\n\n if (node.type === \"ObjectExpression\") {\n return node;\n }\n\n if (\n node.type === \"TSAsExpression\" ||\n node.type === \"TSSatisfiesExpression\" ||\n node.type === \"TSNonNullExpression\" ||\n node.type === \"ChainExpression\"\n ) {\n return getReturnedObjectExpression(node.expression);\n }\n\n return null;\n}\n","// @ts-nocheck\nexport function unwrapExpression(node) {\n if (\n node.type === \"ChainExpression\" ||\n node.type === \"TSAsExpression\" ||\n node.type === \"TSSatisfiesExpression\" ||\n node.type === \"TSNonNullExpression\"\n ) {\n return unwrapExpression(node.expression);\n }\n\n return node;\n}\n","// @ts-nocheck\nimport { unwrapExpression } from \"./unwrap-expression\";\n\nexport function getBooleanLiteralValue(node) {\n const unwrappedNode = unwrapExpression(node);\n\n return unwrappedNode.type === \"Literal\" && typeof unwrappedNode.value === \"boolean\"\n ? unwrappedNode.value\n : null;\n}\n","// @ts-nocheck\nexport function isPropertyKeyNamed(property, propertyName) {\n if (property.key.type === \"Identifier\") {\n return property.key.name === propertyName;\n }\n\n return property.key.type === \"Literal\" && property.key.value === propertyName;\n}\n","// @ts-nocheck\nimport { getBooleanLiteralValue } from \"./get-boolean-literal-value\";\nimport { isPropertyKeyNamed } from \"./is-property-key-named\";\n\n// Detecta `{ ok: true }` / `{ ok: false }` (contrato ad hoc tipo Result),\n// no `{ ok: res.ok }` (un valor cualquiera, p. ej. un Response de fetch).\nexport function hasBooleanOkProperty(node) {\n return node.properties.some(\n (property) =>\n property.type === \"Property\" &&\n isPropertyKeyNamed(property, \"ok\") &&\n getBooleanLiteralValue(property.value) !== null,\n );\n}\n","// @ts-nocheck\nexport function isExportedFunction(node) {\n const parent = node.parent;\n\n if (\n node.type === \"FunctionDeclaration\" &&\n (parent?.type === \"ExportNamedDeclaration\" ||\n parent?.type === \"ExportDefaultDeclaration\")\n ) {\n return true;\n }\n\n if (\n (node.type === \"ArrowFunctionExpression\" ||\n node.type === \"FunctionExpression\") &&\n parent?.type === \"VariableDeclarator\" &&\n parent.parent?.parent?.type === \"ExportNamedDeclaration\"\n ) {\n return true;\n }\n\n return false;\n}\n","// @ts-nocheck\nimport { getContainingFunction } from \"#/utils/get-containing-function\";\nimport { getFunctionName } from \"#/utils/get-function-name\";\nimport { getReturnedObjectExpression } from \"#/utils/get-returned-object-expression\";\nimport { hasBooleanOkProperty } from \"#/utils/has-boolean-ok-property\";\nimport { isExportedFunction } from \"#/utils/is-exported-function\";\n\nexport const noAdHocOkResult = {\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Prohibe retornar contratos ad hoc con ok en funciones async exportadas.\",\n },\n messages: {\n adHocOkResult:\n \"No retornes objetos ad hoc con `ok` desde la funcion async `{{name}}`. Usa Result.ok(...) / Result.err(...) con un error discriminado `{ type: ... }`.\",\n },\n schema: [],\n },\n create(context) {\n return {\n ReturnStatement(node) {\n const returnedObject = getReturnedObjectExpression(node.argument);\n\n if (!returnedObject || !hasBooleanOkProperty(returnedObject)) {\n return;\n }\n\n const containingFunction = getContainingFunction(node);\n\n if (\n !containingFunction?.async ||\n !isExportedFunction(containingFunction)\n ) {\n return;\n }\n\n context.report({\n data: {\n name: getFunctionName(containingFunction),\n },\n messageId: \"adHocOkResult\",\n node,\n });\n },\n };\n },\n };\n","// @ts-nocheck\nexport function getAwaitRequiresResultOptions(options = {}) {\n return {\n allowFilePatterns: options.allowFilePatterns ?? [],\n trySafeCallNames: options.trySafeCallNames ?? [\"trySafe\"],\n };\n}\n","// @ts-nocheck\nimport { getContainingFunction } from \"./get-containing-function\";\nimport { getFunctionName } from \"./get-function-name\";\n\nexport function getAwaitScopeName(node) {\n const containingFunction = getContainingFunction(node);\n\n return containingFunction ? getFunctionName(containingFunction) : \"top-level\";\n}\n","// @ts-nocheck\nimport { isCalleeNamed } from \"./is-callee-named\";\nimport { isFunctionNode } from \"./is-function-node\";\n\n// Si el nodo está dentro de un callback pasado a `trySafe(...)`, devuelve esa\n// CallExpression (para poder verificar su símbolo); si no, null.\nexport function getEnclosingTrySafeCall(node, trySafeCallNames) {\n let currentNode = node.parent;\n\n while (currentNode) {\n if (isFunctionNode(currentNode)) {\n const parent = currentNode.parent;\n\n if (\n parent?.type === \"CallExpression\" &&\n parent.arguments.includes(currentNode) &&\n isCalleeNamed(parent.callee, trySafeCallNames)\n ) {\n return parent;\n }\n\n return null;\n }\n\n currentNode = currentNode.parent;\n }\n\n return null;\n}\n","// @ts-nocheck\nimport { getNodeChildren } from \"./get-node-children\";\nimport { isAstNode } from \"./is-ast-node\";\nimport { isFunctionNode } from \"./is-function-node\";\n\nexport function containsAwaitExpression(node) {\n if (!isAstNode(node)) {\n return false;\n }\n\n if (node.type === \"AwaitExpression\") {\n return true;\n }\n\n if (isFunctionNode(node)) {\n return false;\n }\n\n return getNodeChildren(node).some((child) => containsAwaitExpression(child));\n}\n","// @ts-nocheck\nimport { unwrapExpression } from \"./unwrap-expression\";\n\nexport function getCallExpressionExample(node, sourceCode) {\n const calleeText = sourceCode.getText(node.callee);\n\n if (node.arguments.length === 0) {\n return `${calleeText}()`;\n }\n\n if (node.arguments.length === 1 && unwrapExpression(node.arguments[0]).type === \"ObjectExpression\") {\n return `${calleeText}({...})`;\n }\n\n return `${calleeText}(...)`;\n}\n","// @ts-nocheck\nimport { getCallExpressionExample } from \"./get-call-expression-example\";\nimport { unwrapExpression } from \"./unwrap-expression\";\n\nexport function getAwaitedOperationExample(node, sourceCode) {\n const unwrappedNode = unwrapExpression(node);\n\n if (unwrappedNode.type === \"CallExpression\") {\n return getCallExpressionExample(unwrappedNode, sourceCode);\n }\n\n const expressionText = sourceCode.getText(unwrappedNode).replace(/\\s+/g, \" \");\n\n return expressionText.length > 80\n ? `${expressionText.slice(0, 77)}...`\n : expressionText;\n}\n","// @ts-nocheck\nimport { containsAwaitExpression } from \"./contains-await-expression\";\nimport { getAwaitedOperationExample } from \"./get-awaited-operation-example\";\n\nexport function getTrySafeAwaitSuggestion(node, sourceCode) {\n const callbackKeyword = containsAwaitExpression(node) ? \"async \" : \"\";\n\n return `await trySafe(${callbackKeyword}() => ${getAwaitedOperationExample(\n node,\n sourceCode,\n )})`;\n}\n","// @ts-nocheck\nimport { isSkapxdResultOrPromiseResultType } from \"./is-skapxd-result-or-promise-result-type\";\n\nexport function isSkapxdResultOrPromiseResultExpression(node, typeContext) {\n return isSkapxdResultOrPromiseResultType(\n typeContext.services.getTypeAtLocation(node),\n typeContext,\n );\n}\n","// @ts-nocheck\nimport { isCalleeNamed } from \"./is-callee-named\";\n\nexport function isTrySafeCall(node, trySafeCallNames) {\n return (\n node?.type === \"CallExpression\" &&\n isCalleeNamed(node.callee, trySafeCallNames)\n );\n}\n","// @ts-nocheck\nimport { getAwaitRequiresResultOptions } from \"#/utils/get-await-requires-result-options\";\nimport { getAwaitScopeName } from \"#/utils/get-await-scope-name\";\nimport { getEnclosingTrySafeCall } from \"#/utils/get-enclosing-try-safe-call\";\nimport { getTrySafeAwaitSuggestion } from \"#/utils/get-try-safe-await-suggestion\";\nimport { getTypeContext } from \"#/utils/get-type-context\";\nimport { isSkapxdResultOrPromiseResultExpression } from \"#/utils/is-skapxd-result-or-promise-result-expression\";\nimport { isSymbolFromSkapxdResult } from \"#/utils/is-symbol-from-skapxd-result\";\nimport { isTrySafeCall } from \"#/utils/is-try-safe-call\";\nimport { matchesAnyPattern } from \"#/utils/matches-any-pattern\";\n\nexport const awaitRequiresResult = {\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Exige que todo await resuelva en un Result: una funcion que retorne Promise<Result<...>> o trySafe en el sitio.\",\n },\n messages: {\n awaitWithoutResult:\n \"El await dentro de `{{name}}` no resuelve en un Result. Mejor opcion: extrae la operacion a una funcion que retorne Promise<Result<...>> y modela ahi los errores de dominio (el trySafe vive dentro de esa funcion). Alternativa: envuelvela aqui mismo: `{{suggestion}}`.\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowFilePatterns: {\n items: { type: \"string\" },\n type: \"array\",\n },\n trySafeCallNames: {\n items: { type: \"string\" },\n type: \"array\",\n },\n },\n type: \"object\",\n },\n ],\n },\n create(context) {\n const options = getAwaitRequiresResultOptions(context.options[0]);\n const filename = context.filename ?? context.getFilename();\n const sourceCode = context.sourceCode ?? context.getSourceCode();\n const typeContext = getTypeContext(context);\n\n // Una llamada protege el await solo si es trySafe de @skapxd/result.\n // Con info de tipos se verifica por símbolo; sin ella, el nombre basta.\n function isSkapxdTrySafe(callNode) {\n if (!callNode) {\n return false;\n }\n\n if (!typeContext) {\n return true;\n }\n\n const symbol = typeContext.services.getSymbolAtLocation(callNode.callee);\n\n return Boolean(symbol && isSymbolFromSkapxdResult(symbol, typeContext));\n }\n\n return {\n AwaitExpression(node) {\n if (matchesAnyPattern(filename, options.allowFilePatterns)) {\n return;\n }\n\n // Si lo awaiteado ya es Result/Promise<Result> de @skapxd/result,\n // los errores ya están modelados y trySafe sería redundante.\n if (\n typeContext &&\n isSkapxdResultOrPromiseResultExpression(node.argument, typeContext)\n ) {\n return;\n }\n\n const directCall = isTrySafeCall(node.argument, options.trySafeCallNames)\n ? node.argument\n : null;\n const enclosingCall = getEnclosingTrySafeCall(\n node,\n options.trySafeCallNames,\n );\n\n if (isSkapxdTrySafe(directCall) || isSkapxdTrySafe(enclosingCall)) {\n return;\n }\n\n context.report({\n data: {\n name: getAwaitScopeName(node),\n suggestion: getTrySafeAwaitSuggestion(node.argument, sourceCode),\n },\n messageId: \"awaitWithoutResult\",\n node,\n });\n },\n };\n },\n };\n","// @ts-nocheck\nimport { isMemberPropertyNamed } from \"./is-member-property-named\";\nimport { unwrapExpression } from \"./unwrap-expression\";\n\nexport function getOkMemberObject(node) {\n const unwrappedNode = unwrapExpression(node);\n\n if (\n unwrappedNode.type !== \"MemberExpression\" ||\n unwrappedNode.object.type !== \"Identifier\" ||\n !isMemberPropertyNamed(unwrappedNode, \"ok\")\n ) {\n return null;\n }\n\n return {\n name: unwrappedNode.object.name,\n node: unwrappedNode.object,\n };\n}\n","// @ts-nocheck\nexport function isFailedOkComparison(operator, comparedValue) {\n return (\n (operator === \"===\" && comparedValue === false) ||\n (operator === \"!==\" && comparedValue === true)\n );\n}\n","// @ts-nocheck\nimport { getBooleanLiteralValue } from \"./get-boolean-literal-value\";\nimport { getOkMemberObject } from \"./get-ok-member-object\";\nimport { isFailedOkComparison } from \"./is-failed-ok-comparison\";\n\nexport function getFailedResultBinaryGuardName(node) {\n const leftResult = getOkMemberObject(node.left);\n const rightResult = getOkMemberObject(node.right);\n const leftBoolean = getBooleanLiteralValue(node.left);\n const rightBoolean = getBooleanLiteralValue(node.right);\n\n if (leftResult && rightBoolean !== null) {\n return isFailedOkComparison(node.operator, rightBoolean) ? leftResult : null;\n }\n\n if (rightResult && leftBoolean !== null) {\n return isFailedOkComparison(node.operator, leftBoolean) ? rightResult : null;\n }\n\n return null;\n}\n","// @ts-nocheck\nimport { isMemberPropertyNamed } from \"./is-member-property-named\";\nimport { unwrapExpression } from \"./unwrap-expression\";\n\n// Extrae el Result de una guarda con type-guard, p. ej. `Result.isErr(result)`\n// o `Result.isOk(result)`. Devuelve `{ name, node }` del argumento, o null.\nexport function getResultCheckArgument(node, methodName) {\n const unwrappedNode = unwrapExpression(node);\n\n if (\n unwrappedNode.type !== \"CallExpression\" ||\n unwrappedNode.callee.type !== \"MemberExpression\" ||\n !isMemberPropertyNamed(unwrappedNode.callee, methodName)\n ) {\n return null;\n }\n\n const argument = unwrappedNode.arguments[0];\n\n if (argument?.type !== \"Identifier\") {\n return null;\n }\n\n return { name: argument.name, node: argument };\n}\n","// @ts-nocheck\nimport { getFailedResultBinaryGuardName } from \"./get-failed-result-binary-guard-name\";\nimport { getOkMemberObject } from \"./get-ok-member-object\";\nimport { getResultCheckArgument } from \"./get-result-check-argument\";\nimport { unwrapExpression } from \"./unwrap-expression\";\n\nexport function getFailedResultGuard(node) {\n const unwrappedNode = unwrapExpression(node);\n\n // `!result.ok` o `!Result.isOk(result)`\n if (unwrappedNode.type === \"UnaryExpression\" && unwrappedNode.operator === \"!\") {\n return (\n getOkMemberObject(unwrappedNode.argument) ??\n getResultCheckArgument(unwrappedNode.argument, \"isOk\")\n );\n }\n\n // `Result.isErr(result)`\n if (unwrappedNode.type === \"CallExpression\") {\n return getResultCheckArgument(unwrappedNode, \"isErr\");\n }\n\n // `result.ok === false` / `result.ok !== true`\n if (\n unwrappedNode.type === \"BinaryExpression\" &&\n [\"===\", \"!==\"].includes(unwrappedNode.operator)\n ) {\n return getFailedResultBinaryGuardName(unwrappedNode);\n }\n\n return null;\n}\n","// @ts-nocheck\nimport { isMemberPropertyNamed } from \"./is-member-property-named\";\n\nexport function isResultErrCall(node) {\n // No se exige que el objeto se llame literalmente `Result`: un alias\n // (`import { Result as R }`) también vale. La identidad real (que provenga de\n // @skapxd/result) la verifica `isSkapxdResultErrCall` con el símbolo.\n return (\n node.callee.type === \"MemberExpression\" &&\n node.callee.object.type === \"Identifier\" &&\n isMemberPropertyNamed(node.callee, \"err\")\n );\n}\n","// @ts-nocheck\nimport { getNodeChildren } from \"./get-node-children\";\nimport { isAstNode } from \"./is-ast-node\";\nimport { isFunctionNode } from \"./is-function-node\";\nimport { isResultErrCall } from \"./is-result-err-call\";\n\nexport function getOwnResultErrCalls(node, isRoot = true) {\n if (!isAstNode(node)) {\n return [];\n }\n\n if (isFunctionNode(node) || (!isRoot && node.type === \"IfStatement\")) {\n return [];\n }\n\n const ownCalls =\n node.type === \"CallExpression\" && isResultErrCall(node) ? [node] : [];\n\n return [\n ...ownCalls,\n ...getNodeChildren(node).flatMap((child) => getOwnResultErrCalls(child, false)),\n ];\n}\n","// @ts-nocheck\nexport function getFunctionReturnType(node, typeContext) {\n if (node.returnType?.typeAnnotation) {\n return typeContext.services.getTypeFromTypeNode(node.returnType.typeAnnotation);\n }\n\n const functionType = typeContext.services.getTypeAtLocation(node);\n const signature = functionType.getCallSignatures()[0];\n\n return signature?.getReturnType() ?? null;\n}\n","// @ts-nocheck\nimport { getFunctionReturnType } from \"./get-function-return-type\";\nimport { isSkapxdResultOrPromiseResultType } from \"./is-skapxd-result-or-promise-result-type\";\n\nexport function functionReturnsSkapxdResultType(node, typeContext) {\n const returnType = getFunctionReturnType(node, typeContext);\n\n return Boolean(returnType && isSkapxdResultOrPromiseResultType(returnType, typeContext));\n}\n","// @ts-nocheck\nimport { functionReturnsSkapxdResultType } from \"./function-returns-skapxd-result-type\";\nimport { getContainingFunction } from \"./get-containing-function\";\n\nexport function isInsideSkapxdResultReturningFunction(node, typeContext) {\n const containingFunction = getContainingFunction(node);\n\n return Boolean(\n containingFunction &&\n functionReturnsSkapxdResultType(containingFunction, typeContext),\n );\n}\n","// @ts-nocheck\nimport { isResultErrCall } from \"./is-result-err-call\";\nimport { isSymbolFromSkapxdResult } from \"./is-symbol-from-skapxd-result\";\n\nexport function isSkapxdResultErrCall(node, typeContext) {\n if (!isResultErrCall(node)) {\n return false;\n }\n\n const symbol = typeContext.services.getSymbolAtLocation(node.callee.object);\n\n return Boolean(symbol && isSymbolFromSkapxdResult(symbol, typeContext));\n}\n","// @ts-nocheck\nimport { isSkapxdResultType } from \"./is-skapxd-result-type\";\n\nexport function isSkapxdResultExpression(node, typeContext) {\n return isSkapxdResultType(typeContext.services.getTypeAtLocation(node), typeContext);\n}\n","// @ts-nocheck\nimport { isMemberPropertyNamed } from \"./is-member-property-named\";\nimport { unwrapExpression } from \"./unwrap-expression\";\n\nexport function isResultErrorMember(node, resultName) {\n const unwrappedNode = unwrapExpression(node);\n\n return (\n unwrappedNode.type === \"MemberExpression\" &&\n unwrappedNode.object.type === \"Identifier\" &&\n unwrappedNode.object.name === resultName &&\n isMemberPropertyNamed(unwrappedNode, \"error\")\n );\n}\n","// @ts-nocheck\nimport { isPropertyKeyNamed } from \"./is-property-key-named\";\nimport { isResultErrorMember } from \"./is-result-error-member\";\nimport { unwrapExpression } from \"./unwrap-expression\";\n\nexport function resultErrPreservesCause(node, resultName) {\n const unwrappedNode = unwrapExpression(node);\n\n if (isResultErrorMember(unwrappedNode, resultName)) {\n return true;\n }\n\n if (unwrappedNode.type !== \"ObjectExpression\") {\n return false;\n }\n\n return unwrappedNode.properties.some((property) => {\n if (property.type !== \"Property\" || !isPropertyKeyNamed(property, \"cause\")) {\n return false;\n }\n\n return isResultErrorMember(property.value, resultName);\n });\n}\n","// @ts-nocheck\nimport { getFailedResultGuard } from \"#/utils/get-failed-result-guard\";\nimport { getOwnResultErrCalls } from \"#/utils/get-own-result-err-calls\";\nimport { getTypeContext } from \"#/utils/get-type-context\";\nimport { isInsideSkapxdResultReturningFunction } from \"#/utils/is-inside-skapxd-result-returning-function\";\nimport { isSkapxdResultErrCall } from \"#/utils/is-skapxd-result-err-call\";\nimport { isSkapxdResultExpression } from \"#/utils/is-skapxd-result-expression\";\nimport { resultErrPreservesCause } from \"#/utils/result-err-preserves-cause\";\n\nexport const resultErrorRequiresCause = {\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Exige preservar result.error como cause cuando una funcion que retorna Result transforma un Result fallido en Result.err.\",\n },\n messages: {\n missingCause:\n \"El error de `{{name}}` ya existe como `{{name}}.error`. Preservalo en Result.err con `cause: {{name}}.error`.\",\n },\n schema: [],\n },\n create(context) {\n const typeContext = getTypeContext(context);\n\n return {\n IfStatement(node) {\n const resultGuard = getFailedResultGuard(node.test);\n\n if (\n !typeContext ||\n !resultGuard ||\n !isSkapxdResultExpression(resultGuard.node, typeContext) ||\n !isInsideSkapxdResultReturningFunction(node, typeContext)\n ) {\n return;\n }\n\n for (const resultErrCall of getOwnResultErrCalls(node.consequent)) {\n if (!isSkapxdResultErrCall(resultErrCall, typeContext)) {\n continue;\n }\n\n if (resultErrCall.arguments.length === 0) {\n continue;\n }\n\n if (resultErrPreservesCause(resultErrCall.arguments[0], resultGuard.name)) {\n continue;\n }\n\n context.report({\n data: {\n name: resultGuard.name,\n },\n messageId: \"missingCause\",\n node: resultErrCall,\n });\n }\n },\n };\n },\n };\n","// @ts-nocheck\nimport { getNodeChildren } from \"./get-node-children\";\nimport { isAstNode } from \"./is-ast-node\";\nimport { isCalleeNamed } from \"./is-callee-named\";\nimport { isFunctionNode } from \"./is-function-node\";\n\nexport function countOwnUseStateCallsInNode(node) {\n if (!isAstNode(node)) {\n return 0;\n }\n\n if (isFunctionNode(node)) {\n return 0;\n }\n\n const ownCount =\n node.type === \"CallExpression\" && isCalleeNamed(node.callee, [\"useState\"])\n ? 1\n : 0;\n\n return ownCount + getNodeChildren(node).reduce(\n (total, child) => total + countOwnUseStateCallsInNode(child),\n 0,\n );\n}\n","// @ts-nocheck\nimport { countOwnUseStateCallsInNode } from \"./count-own-use-state-calls-in-node\";\nimport { isAstNode } from \"./is-ast-node\";\n\nexport function countOwnUseStateCalls(node) {\n const body = node.body;\n\n return isAstNode(body) ? countOwnUseStateCallsInNode(body) : 0;\n}\n","// @ts-nocheck\nexport function getFunctionLineCount(node) {\n return node.loc ? node.loc.end.line - node.loc.start.line + 1 : 0;\n}\n","// @ts-nocheck\nexport function getMaxHookSizeOptions(options = {}) {\n return {\n maxLines: options.maxLines ?? 120,\n maxUseState: options.maxUseState ?? 1,\n };\n}\n","// @ts-nocheck\nexport function isHookName(name) {\n return /^use[A-Z0-9]/.test(name ?? \"\");\n}\n","// @ts-nocheck\nimport { countOwnUseStateCalls } from \"#/utils/count-own-use-state-calls\";\nimport { getFunctionExpressionName } from \"#/utils/get-function-expression-name\";\nimport { getFunctionLineCount } from \"#/utils/get-function-line-count\";\nimport { getMaxHookSizeOptions } from \"#/utils/get-max-hook-size-options\";\nimport { getParentFunctionName } from \"#/utils/get-parent-function-name\";\nimport { getParentFunctionReportNode } from \"#/utils/get-parent-function-report-node\";\nimport { isHookName } from \"#/utils/is-hook-name\";\n\nexport const maxHookSize = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Limita el tamaño y cantidad de estados propios en hooks React.\",\n },\n messages: {\n tooLargeHook:\n \"El hook `{{name}}` es demasiado grande: tiene {{lines}} lineas. Maximo permitido: {{maxLines}} lineas. Extrae efectos, handlers o flujos a hooks/archivos semanticos.\",\n tooManyUseState:\n \"El hook `{{name}}` declara {{useStateCount}} useState. Maximo permitido: {{maxUseState}}. Usa useReducer con acciones semanticas cuando varios campos cambian juntos, o extrae estado a hooks especializados.\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n maxLines: { type: \"number\" },\n maxUseState: { type: \"number\" },\n },\n type: \"object\",\n },\n ],\n },\n create(context) {\n const options = getMaxHookSizeOptions(context.options[0]);\n\n function reportIfOversizedHook(node, name, reportNode = node) {\n if (!isHookName(name)) {\n return;\n }\n\n const lines = getFunctionLineCount(node);\n const useStateCount = countOwnUseStateCalls(node);\n\n if (lines > options.maxLines) {\n context.report({\n data: {\n lines: String(lines),\n maxLines: String(options.maxLines),\n name,\n },\n messageId: \"tooLargeHook\",\n node: reportNode,\n });\n }\n\n if (useStateCount > options.maxUseState) {\n context.report({\n data: {\n maxUseState: String(options.maxUseState),\n name,\n useStateCount: String(useStateCount),\n },\n messageId: \"tooManyUseState\",\n node: reportNode,\n });\n }\n }\n\n return {\n ArrowFunctionExpression(node) {\n reportIfOversizedHook(\n node,\n getParentFunctionName(node),\n getParentFunctionReportNode(node),\n );\n },\n FunctionDeclaration(node) {\n reportIfOversizedHook(node, node.id?.name, node.id ?? node);\n },\n FunctionExpression(node) {\n reportIfOversizedHook(\n node,\n getFunctionExpressionName(node),\n getParentFunctionReportNode(node),\n );\n },\n };\n },\n };\n","export function countParentSegments(source: string): number {\n let count = 0;\n\n for (const part of source.split(\"/\")) {\n if (part === \"..\") {\n count += 1;\n continue;\n }\n\n if (part === \".\") {\n continue;\n }\n\n break;\n }\n\n return count;\n}\n","// @ts-nocheck\nimport { countParentSegments } from \"#/utils/count-parent-segments\";\n\nexport const noDeepRelativeImports = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Limita la profundidad de los imports relativos (`../`). Empuja hacia estructuras planas o alias de ruta.\",\n },\n messages: {\n deepRelativeImport:\n \"El import `{{source}}` sube {{depth}} niveles con `../`. Maximo permitido: {{maxDepth}}. Usa un alias de ruta (ej. `@/...`) o acerca el modulo a quien lo usa.\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n maxDepth: { type: \"number\" },\n },\n type: \"object\",\n },\n ],\n },\n create(context) {\n const maxDepth = context.options[0]?.maxDepth ?? 0;\n\n function reportIfTooDeep(source) {\n if (!source || typeof source.value !== \"string\") {\n return;\n }\n\n const depth = countParentSegments(source.value);\n\n if (depth <= maxDepth) {\n return;\n }\n\n context.report({\n data: {\n depth: String(depth),\n maxDepth: String(maxDepth),\n source: source.value,\n },\n messageId: \"deepRelativeImport\",\n node: source,\n });\n }\n\n return {\n ExportAllDeclaration(node) {\n reportIfTooDeep(node.source);\n },\n ExportNamedDeclaration(node) {\n reportIfTooDeep(node.source);\n },\n ImportDeclaration(node) {\n reportIfTooDeep(node.source);\n },\n ImportExpression(node) {\n reportIfTooDeep(node.source);\n },\n };\n },\n};\n","// @ts-nocheck\nimport { getContainingFunction } from \"#/utils/get-containing-function\";\nimport { getFunctionName } from \"#/utils/get-function-name\";\nimport { isFunctionNode } from \"#/utils/is-function-node\";\nimport { isPascalCaseName } from \"#/utils/is-pascal-case-name\";\n\nexport const noFunctionsInsideComponents = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Prohibe definir funciones dentro de componentes React; se recrean en cada render.\",\n },\n messages: {\n functionInsideComponent:\n \"No definas funciones dentro del componente `{{component}}`: se recrean en cada render. Muevela a un hook (`useX`) o a un helper fuera del componente.\",\n },\n schema: [],\n },\n create(context) {\n function isComponentFunction(node) {\n return isFunctionNode(node) && isPascalCaseName(getFunctionName(node));\n }\n\n function reportIfInsideComponent(node) {\n const enclosingFunction = getContainingFunction(node);\n\n if (!enclosingFunction || !isComponentFunction(enclosingFunction)) {\n return;\n }\n\n context.report({\n data: {\n component: getFunctionName(enclosingFunction),\n },\n messageId: \"functionInsideComponent\",\n node,\n });\n }\n\n return {\n ArrowFunctionExpression: reportIfInsideComponent,\n FunctionDeclaration: reportIfInsideComponent,\n FunctionExpression: reportIfInsideComponent,\n };\n },\n};\n","// @ts-nocheck\nexport const noTryCatch = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Prohibe try/catch; usa trySafe de @skapxd/result para modelar el error como Result.\",\n },\n messages: {\n noTryCatch:\n \"Usa `trySafe` de @skapxd/result en lugar de try/catch. El error queda modelado como Result en vez de saltar como excepcion.\",\n },\n schema: [],\n },\n create(context) {\n return {\n TryStatement(node) {\n context.report({\n messageId: \"noTryCatch\",\n node,\n });\n },\n };\n },\n};\n","// @ts-nocheck\nexport const preferTsPattern = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Prefiere match() de ts-pattern sobre switch/case y ternarios anidados.\",\n },\n messages: {\n noSwitch:\n \"Usa `match()` de ts-pattern en lugar de switch/case para un control de flujo exhaustivo y tipado.\",\n noNestedTernary:\n \"Usa `match()` de ts-pattern en lugar de ternarios anidados; mejora la legibilidad y la exhaustividad.\",\n },\n schema: [],\n },\n create(context) {\n return {\n ConditionalExpression(node) {\n if (node.parent?.type === \"ConditionalExpression\") {\n context.report({\n messageId: \"noNestedTernary\",\n node,\n });\n }\n },\n SwitchStatement(node) {\n context.report({\n messageId: \"noSwitch\",\n node,\n });\n },\n };\n },\n};\n","// @ts-nocheck\nexport const noJsxTernaryNull = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Prefiere `condicion && <Elemento />` sobre un ternario con `null` al renderizar JSX.\",\n },\n messages: {\n preferLogicalAnd:\n \"Usa `condicion && elemento` en lugar de un ternario con `null` para renderizar JSX condicional.\",\n },\n schema: [],\n },\n create(context) {\n function isNullLiteral(node) {\n return node?.type === \"Literal\" && node.value === null;\n }\n\n return {\n ConditionalExpression(node) {\n const container = node.parent;\n\n if (container?.type !== \"JSXExpressionContainer\") {\n return;\n }\n\n const host = container.parent;\n\n if (host?.type !== \"JSXElement\" && host?.type !== \"JSXFragment\") {\n return;\n }\n\n if (!isNullLiteral(node.alternate) && !isNullLiteral(node.consequent)) {\n return;\n }\n\n context.report({\n messageId: \"preferLogicalAnd\",\n node,\n });\n },\n };\n },\n};\n","// @ts-nocheck\nexport function isPromiseType(type, typeContext) {\n return typeContext.checker.getPromisedTypeOfPromise(type) !== undefined;\n}\n","// @ts-nocheck\nimport { getTypeContext } from \"#/utils/get-type-context\";\nimport { isMemberPropertyNamed } from \"#/utils/is-member-property-named\";\nimport { isPromiseType } from \"#/utils/is-promise-type\";\n\nconst defaultMethods = [\"catch\", \"finally\", \"then\"];\n\nexport const noPromiseChain = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Prohibe encadenar .then/.catch/.finally en promesas; usa await (envuelto en trySafe).\",\n },\n messages: {\n noPromiseChain:\n \"No encadenes `.{{method}}()` en una promesa. La unica forma de tratar funciones asincronas es `await` (envuelto en `trySafe`).\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n methods: {\n items: { type: \"string\" },\n type: \"array\",\n },\n },\n type: \"object\",\n },\n ],\n },\n create(context) {\n const methods = context.options[0]?.methods ?? defaultMethods;\n const typeContext = getTypeContext(context);\n\n return {\n CallExpression(node) {\n const callee = node.callee;\n\n if (callee.type !== \"MemberExpression\") {\n return;\n }\n\n const method = methods.find((name) => isMemberPropertyNamed(callee, name));\n\n if (!method) {\n return;\n }\n\n // type-aware: solo si el receptor es una promesa. Sin info de tipos\n // (projectService apagado) cae a verificación por nombre.\n if (typeContext) {\n const type = typeContext.services.getTypeAtLocation(callee.object);\n\n if (!isPromiseType(type, typeContext)) {\n return;\n }\n }\n\n context.report({\n data: { method },\n messageId: \"noPromiseChain\",\n node: callee.property,\n });\n },\n };\n },\n};\n","import { oneRootFunctionPerFile } from \"#/rules/one-root-function-per-file\";\nimport { jsxReturnNamePascalCase } from \"#/rules/jsx-return-name-pascal-case\";\nimport { asyncFunctionsReturnResult } from \"#/rules/async-functions-return-result\";\nimport { noAdHocOkResult } from \"#/rules/no-ad-hoc-ok-result\";\nimport { awaitRequiresResult } from \"#/rules/await-requires-result\";\nimport { resultErrorRequiresCause } from \"#/rules/result-error-requires-cause\";\nimport type { Rule } from \"eslint\";\nimport { maxHookSize } from \"#/rules/max-hook-size\";\nimport { noDeepRelativeImports } from \"#/rules/no-deep-relative-imports\";\nimport { noFunctionsInsideComponents } from \"#/rules/no-functions-inside-components\";\nimport { noTryCatch } from \"#/rules/no-try-catch\";\nimport { preferTsPattern } from \"#/rules/prefer-ts-pattern\";\nimport { noJsxTernaryNull } from \"#/rules/no-jsx-ternary-null\";\nimport { noPromiseChain } from \"#/rules/no-promise-chain\";\n\nexport const rules: Record<string, Rule.RuleModule> = {\n \"one-root-function-per-file\": oneRootFunctionPerFile,\n \"jsx-return-name-pascal-case\": jsxReturnNamePascalCase,\n \"async-functions-return-result\": asyncFunctionsReturnResult,\n \"no-ad-hoc-ok-result\": noAdHocOkResult,\n \"await-requires-result\": awaitRequiresResult,\n // Alias deprecado del nombre anterior; se elimina en una versión futura.\n \"await-requires-try-safe\": {\n ...awaitRequiresResult,\n meta: {\n ...awaitRequiresResult.meta,\n deprecated: true,\n replacedBy: [\"skapxd/await-requires-result\"],\n },\n },\n \"result-error-requires-cause\": resultErrorRequiresCause,\n \"max-hook-size\": maxHookSize,\n \"no-deep-relative-imports\": noDeepRelativeImports,\n \"no-functions-inside-components\": noFunctionsInsideComponents,\n \"no-try-catch\": noTryCatch,\n \"prefer-ts-pattern\": preferTsPattern,\n \"no-jsx-ternary-null\": noJsxTernaryNull,\n \"no-promise-chain\": noPromiseChain,\n} as unknown as Record<string, Rule.RuleModule>;\n"],"mappings":";AACO,SAAS,YAAY,UAAU;AACpC,SAAO,SAAS,MAAM,OAAO,EAAE,GAAG,EAAE,KAAK;AAC3C;;;ACFO,SAAS,mBAAmB,UAAU;AAC3C,SAAO,SAAS,SAAS,MAAM,IAAI,SAAS;AAC9C;;;ACFO,SAAS,iBAAiB,UAAU;AACzC,SAAO,SAAS,MAAM,OAAO,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG;AACtD;;;ACFO,SAAS,kBAAkB,cAAc;AAC9C,SAAO,CAAC,UAAU,OAAO,QAAQ,WAAW,SAAS,QAAQ,KAAK,EAAE;AAAA,IAClE;AAAA,EACF;AACF;;;ACJO,SAAS,YAAY,OAAO;AACjC,SAAO,MACJ,QAAQ,WAAW,QAAQ,EAC3B,QAAQ,sBAAsB,OAAO,EACrC,QAAQ,yBAAyB,OAAO,EACxC,QAAQ,kBAAkB,GAAG,EAC7B,QAAQ,UAAU,EAAE,EACpB,kBAAkB;AACvB;;;ACLO,SAAS,2BAA2B,EAAE,WAAW,UAAU,aAAa,GAAG;AAChF,QAAM,qBACJ,aAAa,WAAW,kBAAkB,YAAY,IAClD,SAAS,YAAY,KACrB;AAEN,SAAO,GAAG,YAAY,kBAAkB,CAAC,GAAG,SAAS;AACvD;;;ACVO,SAAS,aAAa,UAAU;AACrC,SAAO,SAAS,MAAM,OAAO,EAAE,OAAO,OAAO;AAC/C;;;ACAO,SAAS,eAAe,UAAU;AACvC,QAA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