@skapxd/eslint-opinionated 0.7.0 → 0.8.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 CHANGED
@@ -546,6 +546,7 @@ de cada regla):
546
546
  | `max-hook-size` | `maxLines`, `maxUseState` |
547
547
  | `no-deep-relative-imports` | `maxDepth` |
548
548
  | `no-default-export` | `allowFilePatterns` (globs, aditivos a los integrados) |
549
+ | `no-emoji` | `allowFilePatterns` (globs) |
549
550
  | `no-functions-inside-components` | `allowJsxCallbacks`, `allowArrayMapCallbacks` (ambas `true` por defecto) |
550
551
  | `no-promise-chain` | `methods` |
551
552
 
@@ -567,6 +568,7 @@ matchea en cualquier carpeta). Las 7 reglas restantes no tienen opciones: su
567
568
  | `skapxd/jsx-return-name-pascal-case` | Funciones que retornan JSX deben nombrarse como componentes. |
568
569
  | `skapxd/no-deep-relative-imports` | Limita la profundidad de los imports relativos (`../`). |
569
570
  | `skapxd/no-default-export` | Prohíbe `export default`; el nombre del símbolo es el contrato. Exime configs/stories y, en el preset `next`, los entrypoints del App Router. |
571
+ | `skapxd/no-emoji` | Prohíbe emojis en strings y JSX; cada sistema los renderiza distinto. Usa un icono SVG. |
570
572
  | `skapxd/no-functions-inside-components` | Prohíbe definir funciones dentro de componentes React. |
571
573
  | `skapxd/no-try-catch` | Prohíbe `try/catch`; usa `trySafe` de `@skapxd/result`. |
572
574
  | `skapxd/no-promise-chain` | Prohíbe `.then/.catch/.finally`; usa `await` (+ `trySafe`). |
@@ -884,6 +886,32 @@ al default export, basta mapear el named en el import dinámico:
884
886
  const Card = lazy(() => import("./card").then((m) => ({ default: m.Card })));
885
887
  ```
886
888
 
889
+ ### `skapxd/no-emoji`
890
+
891
+ Prohíbe emojis en strings, template literals y texto JSX. El problema no es
892
+ estético: un emoji se renderiza con la fuente de emojis del **sistema del
893
+ usuario** — Segoe UI Emoji en Windows, Apple Color Emoji en macOS, Noto en
894
+ Android — así que el mismo carácter se ve distinto en cada plataforma, y en
895
+ un Linux sin fuente de emojis directamente no se renderiza (sale el cuadro
896
+ vacío □). Un SVG se ve idéntico en todas partes.
897
+
898
+ ```tsx
899
+ <button>Enviar 🚀</button> // ❌ depende de la fuente del sistema
900
+ <button>Enviar <Rocket /></button> // ✅ lucide-react: idéntico en todas partes
901
+ ```
902
+
903
+ Detecta por propiedad Unicode (`Extended_Pictographic`), así que los símbolos
904
+ tipográficos normales no se tocan: `→`, `✓`, `©`, `·` pasan sin problema.
905
+
906
+ No revisa comentarios: un emoji en un comentario no llega al navegador. Para
907
+ eximir archivos completos (fixtures, seeds), usa `allowFilePatterns`:
908
+
909
+ ```js
910
+ "skapxd/no-emoji": ["error", {
911
+ allowFilePatterns: ["tests/fixtures/**"],
912
+ }]
913
+ ```
914
+
887
915
  ### `skapxd/no-functions-inside-components`
888
916
 
889
917
  Prohíbe definir funciones **con peso propio** dentro de un componente React
@@ -13,6 +13,7 @@ declare function createAstroConfigs(pluginReference: unknown): ({
13
13
  "skapxd/no-ad-hoc-ok-result": string;
14
14
  "skapxd/no-deep-relative-imports": string;
15
15
  "skapxd/no-default-export": string;
16
+ "skapxd/no-emoji": string;
16
17
  "skapxd/no-promise-chain": string;
17
18
  "skapxd/no-try-catch": string;
18
19
  "skapxd/one-root-function-per-file": string;
@@ -29,6 +30,7 @@ declare function createAstroConfigs(pluginReference: unknown): ({
29
30
  "skapxd/no-ad-hoc-ok-result": string;
30
31
  "skapxd/no-deep-relative-imports": string;
31
32
  "skapxd/no-default-export": string;
33
+ "skapxd/no-emoji": string;
32
34
  "skapxd/no-promise-chain": string;
33
35
  "skapxd/no-try-catch": string;
34
36
  "skapxd/one-root-function-per-file": string;
@@ -13,6 +13,7 @@ declare function createAstroConfigs(pluginReference: unknown): ({
13
13
  "skapxd/no-ad-hoc-ok-result": string;
14
14
  "skapxd/no-deep-relative-imports": string;
15
15
  "skapxd/no-default-export": string;
16
+ "skapxd/no-emoji": string;
16
17
  "skapxd/no-promise-chain": string;
17
18
  "skapxd/no-try-catch": string;
18
19
  "skapxd/one-root-function-per-file": string;
@@ -29,6 +30,7 @@ declare function createAstroConfigs(pluginReference: unknown): ({
29
30
  "skapxd/no-ad-hoc-ok-result": string;
30
31
  "skapxd/no-deep-relative-imports": string;
31
32
  "skapxd/no-default-export": string;
33
+ "skapxd/no-emoji": string;
32
34
  "skapxd/no-promise-chain": string;
33
35
  "skapxd/no-try-catch": string;
34
36
  "skapxd/one-root-function-per-file": string;
@@ -39,6 +39,7 @@ var baseRules = {
39
39
  "skapxd/no-ad-hoc-ok-result": "error",
40
40
  "skapxd/no-deep-relative-imports": "error",
41
41
  "skapxd/no-default-export": "error",
42
+ "skapxd/no-emoji": "error",
42
43
  "skapxd/no-promise-chain": "error",
43
44
  "skapxd/no-try-catch": "error",
44
45
  "skapxd/one-root-function-per-file": "error",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/astro/index.ts","../../src/shared/configs/base-rules.ts","../../src/shared/configs/create-base-language-options.ts","../../src/shared/configs/create-typed-language-options.ts","../../src/astro/configs.ts"],"sourcesContent":["export { createAstroConfigs } from \"./configs\";\n","export const baseRules = {\n \"skapxd/no-ad-hoc-ok-result\": \"error\",\n \"skapxd/no-deep-relative-imports\": \"error\",\n \"skapxd/no-default-export\": \"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 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","import {\n baseRules,\n createBaseLanguageOptions,\n createTypedLanguageOptions,\n} from \"#/shared/configs\";\n\nexport function createAstroConfigs(pluginReference: unknown) {\n const baseLanguageOptions = createBaseLanguageOptions();\n const typedLanguageOptions = createTypedLanguageOptions();\n\n return [\n {\n files: [\"src/**/*.{ts,tsx}\"],\n languageOptions: baseLanguageOptions,\n name: \"skapxd/astro/base\",\n plugins: { skapxd: pluginReference },\n rules: baseRules,\n },\n // Los .astro no llevan parser propio: lo aporta eslint-plugin-astro,\n // que el consumidor debe tener configurado.\n {\n files: [\"src/**/*.astro\"],\n name: \"skapxd/astro/astro-files\",\n plugins: { skapxd: pluginReference },\n rules: baseRules,\n },\n {\n files: [\"src/**/*.{ts,tsx}\"],\n languageOptions: typedLanguageOptions,\n name: \"skapxd/astro/typescript\",\n plugins: { skapxd: pluginReference },\n rules: {\n \"skapxd/await-requires-result\": \"error\",\n \"skapxd/result-error-requires-cause\": \"error\",\n },\n },\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;AAAA,EACvB,8BAA8B;AAAA,EAC9B,mCAAmC;AAAA,EACnC,4BAA4B;AAAA,EAC5B,2BAA2B;AAAA,EAC3B,uBAAuB;AAAA,EACvB,qCAAqC;AAAA,EACrC,4BAA4B;AAAA,EAC5B,sCAAsC;AACxC;;;ACTA,+BAAqB;AAId,SAAS,4BAA4B;AAC1C,SAAO;AAAA,IACL,QAAQ,yBAAAA,QAAS;AAAA,EACnB;AACF;;;ACRA,IAAAC,4BAAqB;AAEd,SAAS,6BAA6B;AAC3C,SAAO;AAAA;AAAA;AAAA,IAGL,QAAQ,0BAAAC,QAAS;AAAA,IACjB,eAAe;AAAA,MACb,gBAAgB;AAAA,IAClB;AAAA,EACF;AACF;;;ACLO,SAAS,mBAAmB,iBAA0B;AAC3D,QAAM,sBAAsB,0BAA0B;AACtD,QAAM,uBAAuB,2BAA2B;AAExD,SAAO;AAAA,IACL;AAAA,MACE,OAAO,CAAC,mBAAmB;AAAA,MAC3B,iBAAiB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,IACT;AAAA;AAAA;AAAA,IAGA;AAAA,MACE,OAAO,CAAC,gBAAgB;AAAA,MACxB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO,CAAC,mBAAmB;AAAA,MAC3B,iBAAiB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,QACL,gCAAgC;AAAA,QAChC,sCAAsC;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AACF;","names":["tseslint","import_typescript_eslint","tseslint"]}
1
+ {"version":3,"sources":["../../src/astro/index.ts","../../src/shared/configs/base-rules.ts","../../src/shared/configs/create-base-language-options.ts","../../src/shared/configs/create-typed-language-options.ts","../../src/astro/configs.ts"],"sourcesContent":["export { createAstroConfigs } from \"./configs\";\n","export const baseRules = {\n \"skapxd/no-ad-hoc-ok-result\": \"error\",\n \"skapxd/no-deep-relative-imports\": \"error\",\n \"skapxd/no-default-export\": \"error\",\n \"skapxd/no-emoji\": \"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 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","import {\n baseRules,\n createBaseLanguageOptions,\n createTypedLanguageOptions,\n} from \"#/shared/configs\";\n\nexport function createAstroConfigs(pluginReference: unknown) {\n const baseLanguageOptions = createBaseLanguageOptions();\n const typedLanguageOptions = createTypedLanguageOptions();\n\n return [\n {\n files: [\"src/**/*.{ts,tsx}\"],\n languageOptions: baseLanguageOptions,\n name: \"skapxd/astro/base\",\n plugins: { skapxd: pluginReference },\n rules: baseRules,\n },\n // Los .astro no llevan parser propio: lo aporta eslint-plugin-astro,\n // que el consumidor debe tener configurado.\n {\n files: [\"src/**/*.astro\"],\n name: \"skapxd/astro/astro-files\",\n plugins: { skapxd: pluginReference },\n rules: baseRules,\n },\n {\n files: [\"src/**/*.{ts,tsx}\"],\n languageOptions: typedLanguageOptions,\n name: \"skapxd/astro/typescript\",\n plugins: { skapxd: pluginReference },\n rules: {\n \"skapxd/await-requires-result\": \"error\",\n \"skapxd/result-error-requires-cause\": \"error\",\n },\n },\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;AAAA,EACvB,8BAA8B;AAAA,EAC9B,mCAAmC;AAAA,EACnC,4BAA4B;AAAA,EAC5B,mBAAmB;AAAA,EACnB,2BAA2B;AAAA,EAC3B,uBAAuB;AAAA,EACvB,qCAAqC;AAAA,EACrC,4BAA4B;AAAA,EAC5B,sCAAsC;AACxC;;;ACVA,+BAAqB;AAId,SAAS,4BAA4B;AAC1C,SAAO;AAAA,IACL,QAAQ,yBAAAA,QAAS;AAAA,EACnB;AACF;;;ACRA,IAAAC,4BAAqB;AAEd,SAAS,6BAA6B;AAC3C,SAAO;AAAA;AAAA;AAAA,IAGL,QAAQ,0BAAAC,QAAS;AAAA,IACjB,eAAe;AAAA,MACb,gBAAgB;AAAA,IAClB;AAAA,EACF;AACF;;;ACLO,SAAS,mBAAmB,iBAA0B;AAC3D,QAAM,sBAAsB,0BAA0B;AACtD,QAAM,uBAAuB,2BAA2B;AAExD,SAAO;AAAA,IACL;AAAA,MACE,OAAO,CAAC,mBAAmB;AAAA,MAC3B,iBAAiB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,IACT;AAAA;AAAA;AAAA,IAGA;AAAA,MACE,OAAO,CAAC,gBAAgB;AAAA,MACxB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO,CAAC,mBAAmB;AAAA,MAC3B,iBAAiB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS,EAAE,QAAQ,gBAAgB;AAAA,MACnC,OAAO;AAAA,QACL,gCAAgC;AAAA,QAChC,sCAAsC;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AACF;","names":["tseslint","import_typescript_eslint","tseslint"]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAstroConfigs
3
- } from "../chunk-OVPAO7Q3.mjs";
4
- import "../chunk-LDAR6XT6.mjs";
3
+ } from "../chunk-MSH2BTXH.mjs";
4
+ import "../chunk-Z6CU2N4C.mjs";
5
5
  export {
6
6
  createAstroConfigs
7
7
  };
@@ -6,7 +6,7 @@ import {
6
6
  baseRules,
7
7
  createBaseLanguageOptions,
8
8
  createTypedLanguageOptions
9
- } from "./chunk-LDAR6XT6.mjs";
9
+ } from "./chunk-Z6CU2N4C.mjs";
10
10
 
11
11
  // src/next/configs.ts
12
12
  var nextDefaultExportFileGlob = `{${[
@@ -69,4 +69,4 @@ function createNextConfigs(pluginReference) {
69
69
  export {
70
70
  createNextConfigs
71
71
  };
72
- //# sourceMappingURL=chunk-72XIHMY7.mjs.map
72
+ //# sourceMappingURL=chunk-2IXJXIW5.mjs.map
@@ -1387,6 +1387,67 @@ var noDefaultExport = {
1387
1387
  }
1388
1388
  };
1389
1389
 
1390
+ // src/utils/contains-emoji.ts
1391
+ var emojiPattern = /\p{Extended_Pictographic}/u;
1392
+ function containsEmoji(value) {
1393
+ return emojiPattern.test(value);
1394
+ }
1395
+
1396
+ // src/utils/get-no-emoji-options.ts
1397
+ function getNoEmojiOptions(options = {}) {
1398
+ return {
1399
+ allowFilePatterns: options.allowFilePatterns ?? []
1400
+ };
1401
+ }
1402
+
1403
+ // src/rules/no-emoji.ts
1404
+ var noEmoji = {
1405
+ meta: {
1406
+ type: "problem",
1407
+ docs: {
1408
+ description: "Prohibe emojis en strings y JSX; cada sistema los renderiza distinto (o no los renderiza)."
1409
+ },
1410
+ messages: {
1411
+ noEmoji: "No uses emojis en el codigo: se renderizan con la fuente del sistema del usuario, distinta en cada plataforma (y ausente en algunos Linux, donde sale un cuadro vacio). Reemplazalo por un icono SVG con el mismo significado (p. ej. lucide-react) o un asset SVG propio."
1412
+ },
1413
+ schema: [
1414
+ {
1415
+ additionalProperties: false,
1416
+ properties: {
1417
+ allowFilePatterns: {
1418
+ items: { type: "string" },
1419
+ type: "array"
1420
+ }
1421
+ },
1422
+ type: "object"
1423
+ }
1424
+ ]
1425
+ },
1426
+ create(context) {
1427
+ const options = getNoEmojiOptions(context.options[0]);
1428
+ const filename = context.filename ?? context.getFilename();
1429
+ if (matchesAnyGlob(filename, options.allowFilePatterns)) {
1430
+ return {};
1431
+ }
1432
+ function reportIfEmoji(node, value) {
1433
+ if (typeof value === "string" && containsEmoji(value)) {
1434
+ context.report({ messageId: "noEmoji", node });
1435
+ }
1436
+ }
1437
+ return {
1438
+ JSXText(node) {
1439
+ reportIfEmoji(node, node.value);
1440
+ },
1441
+ Literal(node) {
1442
+ reportIfEmoji(node, node.value);
1443
+ },
1444
+ TemplateElement(node) {
1445
+ reportIfEmoji(node, node.value.raw);
1446
+ }
1447
+ };
1448
+ }
1449
+ };
1450
+
1390
1451
  // src/utils/get-no-functions-inside-components-options.ts
1391
1452
  function getNoFunctionsInsideComponentsOptions(options = {}) {
1392
1453
  return {
@@ -1647,6 +1708,7 @@ var rules = {
1647
1708
  "max-hook-size": maxHookSize,
1648
1709
  "no-deep-relative-imports": noDeepRelativeImports,
1649
1710
  "no-default-export": noDefaultExport,
1711
+ "no-emoji": noEmoji,
1650
1712
  "no-functions-inside-components": noFunctionsInsideComponents,
1651
1713
  "no-try-catch": noTryCatch,
1652
1714
  "prefer-ts-pattern": preferTsPattern,
@@ -1657,4 +1719,4 @@ var rules = {
1657
1719
  export {
1658
1720
  rules
1659
1721
  };
1660
- //# sourceMappingURL=chunk-G6TJUBFT.mjs.map
1722
+ //# sourceMappingURL=chunk-47EZPLJX.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-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-glob.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/constants/default-export-allowed-file-patterns.ts","../src/utils/get-no-default-export-options.ts","../src/rules/no-default-export.ts","../src/utils/contains-emoji.ts","../src/utils/get-no-emoji-options.ts","../src/rules/no-emoji.ts","../src/utils/get-no-functions-inside-components-options.ts","../src/utils/is-array-map-callback.ts","../src/utils/is-expression-arrow-function.ts","../src/utils/is-jsx-attribute-callback.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 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\nimport picomatch from \"picomatch\";\n\n// Matching de rutas con globs delegado a picomatch (el motor que usan\n// fast-glob, chokidar y vitest). Dos ergonomías propias:\n// - separadores de Windows normalizados, mismo glob en cualquier sistema;\n// - un patrón sin prefijo (`src/index.ts`, `*.config.*`) matchea en\n// cualquier carpeta — se le antepone `**/`.\nexport function matchesAnyGlob(filePath, globs) {\n const normalized = filePath.replaceAll(\"\\\\\", \"/\");\n\n return globs.some((glob) => {\n const anchored =\n glob.startsWith(\"/\") || glob.startsWith(\"**\") ? glob : `**/${glob}`;\n\n return picomatch(anchored)(normalized);\n });\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 { matchesAnyGlob } from \"#/utils/matches-any-glob\";\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: trySafe en la frontera, errores de dominio con `cause`, y el consumidor decide con `match()` de ts-pattern.\",\n invalidReturnType:\n \"La funcion async `{{name}}` debe retornar Promise<Result<...>> para modelar errores de forma explicita: trySafe en la frontera, errores de dominio con `cause`, y el consumidor decide con `match()` de ts-pattern.\",\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 || matchesAnyGlob(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(...) de @skapxd/result con un error discriminado `{ type: ... }`: un unico contrato Result permite consumir cada variante con `match()` de ts-pattern y `.exhaustive()`.\",\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 { matchesAnyGlob } from \"#/utils/matches-any-glob\";\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 con `{ type, message, cause }` (el trySafe vive dentro de esa funcion). Alternativa: envuelvela aqui mismo: `{{suggestion}}`. En ambos casos, consume el Result con `match()` de ts-pattern.\",\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 (matchesAnyGlob(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`: la cadena de causas conecta el error de dominio con la excepcion original que capturo `trySafe`; sin ella el debugging pierde el contexto.\",\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\n// Archivos donde el ecosistema EXIGE `export default` y la regla\n// no-default-export no debe reportar nunca: configs de tooling\n// (next.config, tailwind.config, vitest.config, eslint.config, ...) y\n// stories de Storybook (el meta es un default export por contrato CSF).\n// Son GLOBS, no regex: `*` = un segmento, `**` = cualquier profundidad.\nexport const defaultExportAllowedFilePatterns = [\n \"*.config.*\",\n \"*.stories.*\",\n];\n","// @ts-nocheck\nimport { defaultExportAllowedFilePatterns } from \"#/constants/default-export-allowed-file-patterns\";\n\n// allowFilePatterns es ADITIVO: los patrones del consumidor se suman a los\n// integrados. Así, cuando aparezca un framework o tool que la regla aún no\n// contempla, basta con agregar su patrón sin perder los conocidos.\nexport function getNoDefaultExportOptions(options = {}) {\n return {\n allowFilePatterns: [\n ...defaultExportAllowedFilePatterns,\n ...(options.allowFilePatterns ?? []),\n ],\n };\n}\n","// @ts-nocheck\nimport { getNoDefaultExportOptions } from \"#/utils/get-no-default-export-options\";\nimport { matchesAnyGlob } from \"#/utils/matches-any-glob\";\n\nexport const noDefaultExport = {\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Prohibe export default; un export nombrado hace del nombre el contrato del modulo.\",\n },\n messages: {\n noDefaultExport:\n \"No uses `export default`: un export nombrado hace el simbolo renombrable con el IDE, grepeable y estable en autoimports. Si este archivo es un entrypoint donde un framework o tool exige el default, agrega su glob en `allowFilePatterns` de skapxd/no-default-export (p. ej. \\\"+page.ts\\\").\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowFilePatterns: {\n items: { type: \"string\" },\n type: \"array\",\n },\n },\n type: \"object\",\n },\n ],\n },\n create(context) {\n const options = getNoDefaultExportOptions(context.options[0]);\n const filename = context.filename ?? context.getFilename();\n\n if (matchesAnyGlob(filename, options.allowFilePatterns)) {\n return {};\n }\n\n return {\n ExportDefaultDeclaration(node) {\n context.report({ messageId: \"noDefaultExport\", node });\n },\n // Cubre la forma indirecta: `export { algo as default }`.\n ExportNamedDeclaration(node) {\n for (const specifier of node.specifiers ?? []) {\n const exportedName =\n specifier.exported?.name ?? specifier.exported?.value;\n\n if (exportedName === \"default\") {\n context.report({ messageId: \"noDefaultExport\", node: specifier });\n }\n }\n },\n };\n },\n};\n","// @ts-nocheck\n// Detección por propiedad Unicode: Extended_Pictographic cubre los emojis y\n// pictogramas (🚀, ✅, 😄) sin tocar símbolos de texto normales (→, ✓, ©).\nconst emojiPattern = /\\p{Extended_Pictographic}/u;\n\nexport function containsEmoji(value) {\n return emojiPattern.test(value);\n}\n","// @ts-nocheck\nexport function getNoEmojiOptions(options = {}) {\n return {\n allowFilePatterns: options.allowFilePatterns ?? [],\n };\n}\n","// @ts-nocheck\nimport { containsEmoji } from \"#/utils/contains-emoji\";\nimport { getNoEmojiOptions } from \"#/utils/get-no-emoji-options\";\nimport { matchesAnyGlob } from \"#/utils/matches-any-glob\";\n\nexport const noEmoji = {\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Prohibe emojis en strings y JSX; cada sistema los renderiza distinto (o no los renderiza).\",\n },\n messages: {\n noEmoji:\n \"No uses emojis en el codigo: se renderizan con la fuente del sistema del usuario, distinta en cada plataforma (y ausente en algunos Linux, donde sale un cuadro vacio). Reemplazalo por un icono SVG con el mismo significado (p. ej. lucide-react) o un asset SVG propio.\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowFilePatterns: {\n items: { type: \"string\" },\n type: \"array\",\n },\n },\n type: \"object\",\n },\n ],\n },\n create(context) {\n const options = getNoEmojiOptions(context.options[0]);\n const filename = context.filename ?? context.getFilename();\n\n if (matchesAnyGlob(filename, options.allowFilePatterns)) {\n return {};\n }\n\n function reportIfEmoji(node, value) {\n if (typeof value === \"string\" && containsEmoji(value)) {\n context.report({ messageId: \"noEmoji\", node });\n }\n }\n\n return {\n JSXText(node) {\n reportIfEmoji(node, node.value);\n },\n Literal(node) {\n reportIfEmoji(node, node.value);\n },\n TemplateElement(node) {\n reportIfEmoji(node, node.value.raw);\n },\n };\n },\n};\n","// @ts-nocheck\n// Los callbacks inline de JSX y de .map son React idiomático: permitidos por\n// defecto. El modo ultraestricto se activa pasando `false` explícito.\nexport function getNoFunctionsInsideComponentsOptions(options = {}) {\n return {\n allowArrayMapCallbacks: options.allowArrayMapCallbacks ?? true,\n allowJsxCallbacks: options.allowJsxCallbacks ?? true,\n };\n}\n","// @ts-nocheck\n// `items.map((item) => <Item ... />)`: la función es el primer argumento de\n// una llamada `.map(...)`.\nexport function isArrayMapCallback(node) {\n const parent = node.parent;\n\n if (parent?.type !== \"CallExpression\" || parent.arguments[0] !== node) {\n return false;\n }\n\n const callee = parent.callee;\n\n return (\n callee?.type === \"MemberExpression\" &&\n !callee.computed &&\n callee.property?.type === \"Identifier\" &&\n callee.property.name === \"map\"\n );\n}\n","// @ts-nocheck\n// Una flecha \"de expresión\": sin cuerpo de bloque. Solo puede contener una\n// expresión (JSX, una llamada), así que es declarativa por construcción. Un\n// cuerpo con llaves (`=> { return ... }`) ya da pie a ifs, variables y lógica\n// — eso debe vivir fuera del componente. Las function expressions siempre\n// tienen bloque, así que nunca califican.\nexport function isExpressionArrowFunction(node) {\n return (\n node.type === \"ArrowFunctionExpression\" &&\n node.body.type !== \"BlockStatement\"\n );\n}\n","// @ts-nocheck\n// `<button onClick={() => ...} />`: la función es el valor directo de una\n// prop JSX (ArrowFunction → JSXExpressionContainer → JSXAttribute).\nexport function isJsxAttributeCallback(node) {\n return (\n node.parent?.type === \"JSXExpressionContainer\" &&\n node.parent.parent?.type === \"JSXAttribute\"\n );\n}\n","// @ts-nocheck\nimport { getContainingFunction } from \"#/utils/get-containing-function\";\nimport { getFunctionName } from \"#/utils/get-function-name\";\nimport { getNoFunctionsInsideComponentsOptions } from \"#/utils/get-no-functions-inside-components-options\";\nimport { isArrayMapCallback } from \"#/utils/is-array-map-callback\";\nimport { isExpressionArrowFunction } from \"#/utils/is-expression-arrow-function\";\nimport { isFunctionNode } from \"#/utils/is-function-node\";\nimport { isJsxAttributeCallback } from \"#/utils/is-jsx-attribute-callback\";\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. Los callbacks inline de JSX y .map solo se permiten como flecha de expresion (sin cuerpo `{ }`): un bloque ya da pie a ifs y logica que pertenece fuera.\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowArrayMapCallbacks: { type: \"boolean\" },\n allowJsxCallbacks: { type: \"boolean\" },\n },\n type: \"object\",\n },\n ],\n },\n create(context) {\n const options = getNoFunctionsInsideComponentsOptions(context.options[0]);\n\n function isComponentFunction(node) {\n return isFunctionNode(node) && isPascalCaseName(getFunctionName(node));\n }\n\n function isAllowedInlineCallback(node) {\n if (!isExpressionArrowFunction(node)) {\n return false;\n }\n\n if (options.allowJsxCallbacks && isJsxAttributeCallback(node)) {\n return true;\n }\n\n return options.allowArrayMapCallbacks && isArrayMapCallback(node);\n }\n\n function reportIfInsideComponent(node) {\n const enclosingFunction = getContainingFunction(node);\n\n if (!enclosingFunction || !isComponentFunction(enclosingFunction)) {\n return;\n }\n\n if (isAllowedInlineCallback(node)) {\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. Luego mapealo a un error de dominio `{ type, message, cause }` y consumelo con `match()` de ts-pattern.\",\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. Es la pieza que cierra el sistema de errores: un Result con errores `{ type: ... }` se consume con una rama `.with()` por variante y `.exhaustive()` garantiza que ninguna quede sin manejar.\",\n noNestedTernary:\n \"Usa `match()` de ts-pattern en lugar de ternarios anidados; mejora la legibilidad y `.exhaustive()` obliga a cubrir todos los casos.\",\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`: o la funcion llamada ya retorna Promise<Result<...>> o envuelve la llamada en `trySafe` de @skapxd/result.\",\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 { noDefaultExport } from \"#/rules/no-default-export\";\nimport { noEmoji } from \"#/rules/no-emoji\";\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-default-export\": noDefaultExport,\n \"no-emoji\": noEmoji,\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;AA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X,MAAM,OAAO;AAAA,QACf,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;;;AClDO,IAAM,QAAyC;AAAA,EACpD,8BAA8B;AAAA,EAC9B,+BAA+B;AAAA,EAC/B,iCAAiC;AAAA,EACjC,uBAAuB;AAAA,EACvB,yBAAyB;AAAA;AAAA,EAEzB,2BAA2B;AAAA,IACzB,GAAG;AAAA,IACH,MAAM;AAAA,MACJ,GAAG,oBAAoB;AAAA,MACvB,YAAY;AAAA,MACZ,YAAY,CAAC,8BAA8B;AAAA,IAC7C;AAAA,EACF;AAAA,EACA,+BAA+B;AAAA,EAC/B,iBAAiB;AAAA,EACjB,4BAA4B;AAAA,EAC5B,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,kCAAkC;AAAA,EAClC,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,oBAAoB;AACtB;","names":[]}
@@ -2,7 +2,7 @@ import {
2
2
  baseRules,
3
3
  createBaseLanguageOptions,
4
4
  createTypedLanguageOptions
5
- } from "./chunk-LDAR6XT6.mjs";
5
+ } from "./chunk-Z6CU2N4C.mjs";
6
6
 
7
7
  // src/astro/configs.ts
8
8
  function createAstroConfigs(pluginReference) {
@@ -40,4 +40,4 @@ function createAstroConfigs(pluginReference) {
40
40
  export {
41
41
  createAstroConfigs
42
42
  };
43
- //# sourceMappingURL=chunk-OVPAO7Q3.mjs.map
43
+ //# sourceMappingURL=chunk-MSH2BTXH.mjs.map
@@ -16,6 +16,7 @@ var baseRules = {
16
16
  "skapxd/no-ad-hoc-ok-result": "error",
17
17
  "skapxd/no-deep-relative-imports": "error",
18
18
  "skapxd/no-default-export": "error",
19
+ "skapxd/no-emoji": "error",
19
20
  "skapxd/no-promise-chain": "error",
20
21
  "skapxd/no-try-catch": "error",
21
22
  "skapxd/one-root-function-per-file": "error",
@@ -106,4 +107,4 @@ export {
106
107
  createSharedConfigs,
107
108
  strictConfig
108
109
  };
109
- //# sourceMappingURL=chunk-LDAR6XT6.mjs.map
110
+ //# sourceMappingURL=chunk-Z6CU2N4C.mjs.map
@@ -0,0 +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-default-export\": \"error\",\n \"skapxd/no-emoji\": \"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 // La regla obligatoria del sistema de errores es await-requires-result\n // (todo await resuelve en Result). async-functions-return-result queda\n // apagada por defecto: exigir la firma por decreto choca con los bordes\n // del framework y bloquea la adopción incremental; la presión sobre los\n // awaits produce el mismo estado final. Ver \"¿Por qué está apagada por\n // defecto?\" en el README.\n \"skapxd/await-requires-result\": \"error\",\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,4BAA4B;AAAA,EAC5B,mBAAmB;AAAA,EACnB,2BAA2B;AAAA,EAC3B,uBAAuB;AAAA,EACvB,qCAAqC;AAAA,EACrC,4BAA4B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