pasika 0.3.7 → 0.3.9

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.
@@ -1,7 +1,12 @@
1
- // eslint/pasika/rules/filename-case.ts
1
+ // eslint/index.ts
2
+ import css from "@eslint/css";
3
+ import jsonPlugin from "@eslint/json";
4
+ import markdown from "@eslint/markdown";
5
+
6
+ // eslint/rules/filename-case.ts
2
7
  import path2 from "path";
3
8
 
4
- // eslint/pasika/rules/component-conventions.ts
9
+ // eslint/rules/component-conventions.ts
5
10
  import path from "path";
6
11
  import ts from "typescript";
7
12
  var isPascalCase = (name) => /^[A-Z][A-Za-z0-9]*$/.test(name);
@@ -128,7 +133,7 @@ function getTestId(root) {
128
133
  return { value: value.text, attribute };
129
134
  }
130
135
 
131
- // eslint/pasika/rules/filename-case.ts
136
+ // eslint/rules/filename-case.ts
132
137
  var NEXT_ROUTING_FILES = /* @__PURE__ */ new Set([
133
138
  "page",
134
139
  "layout",
@@ -221,7 +226,7 @@ function report(context, filename, ext) {
221
226
  };
222
227
  }
223
228
 
224
- // eslint/pasika/rules/import-boundaries.ts
229
+ // eslint/rules/import-boundaries.ts
225
230
  import path3 from "path";
226
231
  var sourceRoot = path3.resolve("src");
227
232
  var rootSupportFolders = /* @__PURE__ */ new Set(["config", "constants", "hooks", "locales", "schemas", "types", "utils"]);
@@ -344,7 +349,7 @@ var importBoundariesRule = {
344
349
  }
345
350
  };
346
351
 
347
- // eslint/pasika/rules/no-mixed-concerns.ts
352
+ // eslint/rules/no-mixed-concerns.ts
348
353
  function getExportName(declaration) {
349
354
  if (declaration?.type === "FunctionDeclaration" && declaration.id) {
350
355
  return declaration.id.name ?? null;
@@ -404,7 +409,7 @@ var noMixedConcernsRule = {
404
409
  }
405
410
  };
406
411
 
407
- // eslint/pasika/rules/no-arbitrary-tailwind.ts
412
+ // eslint/rules/no-arbitrary-tailwind.ts
408
413
  var ARBITRARY_VALUE_RE = /(?:^|(?<=\s))(?:[a-z]+(?:-[a-z]+)*)-\[[^\]]+\](?![-\w]*:)/g;
409
414
  var CLASS_HELPERS = /* @__PURE__ */ new Set(["cn", "clsx", "twMerge", "twJoin"]);
410
415
  var noArbitraryTailwindRule = {
@@ -473,7 +478,7 @@ var noArbitraryTailwindRule = {
473
478
  }
474
479
  };
475
480
 
476
- // eslint/pasika/rules/enforce-cn-merge.ts
481
+ // eslint/rules/enforce-cn-merge.ts
477
482
  function classCount(str) {
478
483
  return str.split(/\s+/).filter(Boolean).length;
479
484
  }
@@ -547,7 +552,44 @@ var enforceCnMergeRule = {
547
552
  }
548
553
  };
549
554
 
550
- // eslint/pasika/rules/enforce-cva-variant-props.ts
555
+ // eslint/rules/cn-helper.ts
556
+ function isIdentifier(node, name) {
557
+ return node?.type === "Identifier" && node.name === name;
558
+ }
559
+ var cnHelperRule = {
560
+ meta: {
561
+ schema: [],
562
+ type: "problem",
563
+ docs: {
564
+ description: "Require the cn helper to merge clsx and tailwind-merge."
565
+ }
566
+ },
567
+ create(context) {
568
+ return {
569
+ FunctionDeclaration(node) {
570
+ if (isIdentifier(node.id, "cn")) checkBody(context, node.body);
571
+ },
572
+ VariableDeclarator(node) {
573
+ if (node.init?.type === "ArrowFunctionExpression" && isIdentifier(node.id, "cn")) {
574
+ checkBody(context, node.init.body);
575
+ }
576
+ }
577
+ };
578
+ }
579
+ };
580
+ function checkBody(context, body) {
581
+ const source = context.sourceCode.getText(body);
582
+ const usesClsx = /\bclsx\b/.test(source);
583
+ const usesTwMerge = /\btwMerge\b|\btailwind-merge\b/.test(source);
584
+ if (!usesClsx || !usesTwMerge) {
585
+ context.report({
586
+ node: body,
587
+ message: "cn must be built from clsx and tailwind-merge (e.g. cn = twMerge(clsx(inputs)))."
588
+ });
589
+ }
590
+ }
591
+
592
+ // eslint/rules/enforce-cva-variant-props.ts
551
593
  var enforceCvaVariantPropsRule = {
552
594
  meta: {
553
595
  schema: [],
@@ -610,7 +652,7 @@ var enforceCvaVariantPropsRule = {
610
652
  }
611
653
  };
612
654
 
613
- // eslint/pasika/rules/enforce-barrel-exports.ts
655
+ // eslint/rules/enforce-barrel-exports.ts
614
656
  import path4 from "path";
615
657
  import fs from "fs";
616
658
  function isPascalCase3(str) {
@@ -672,14 +714,14 @@ var enforceBarrelExportsRule = {
672
714
  }
673
715
  };
674
716
 
675
- // eslint/pasika/rules/component-placement.ts
717
+ // eslint/rules/component-placement.ts
676
718
  import path8 from "path";
677
719
 
678
- // eslint/pasika/project/index.ts
720
+ // eslint/project/index.ts
679
721
  import { readdirSync, statSync } from "fs";
680
722
  import path6 from "path";
681
723
 
682
- // eslint/pasika/project/parse-module.ts
724
+ // eslint/project/parse-module.ts
683
725
  import path5 from "path";
684
726
  import { readFileSync } from "fs";
685
727
  import ts2 from "typescript";
@@ -784,7 +826,7 @@ function parseModule(file) {
784
826
  return { file: path5.resolve(file), imports, exports };
785
827
  }
786
828
 
787
- // eslint/pasika/project/index.ts
829
+ // eslint/project/index.ts
788
830
  var MODULE_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"];
789
831
  var INDEX_BASENAMES = ["index.ts", "index.tsx", "index.mts", "index.cts", "index.js", "index.jsx"];
790
832
  var REVALIDATE_AFTER_MS = 2e3;
@@ -890,7 +932,7 @@ function getProjectIndex(sourceRoot2) {
890
932
  return index;
891
933
  }
892
934
 
893
- // eslint/pasika/project/ccf.ts
935
+ // eslint/project/ccf.ts
894
936
  import path7 from "path";
895
937
  var SUPPORT_FOLDERS2 = /* @__PURE__ */ new Set(["hooks", "types", "schemas", "constants", "utils"]);
896
938
  function segmentsOf(file, sourceRoot2) {
@@ -979,7 +1021,7 @@ function describeConsumers(consumers, sourceRoot2) {
979
1021
  return `${names.slice(0, shown).join(", ")} and ${String(names.length - shown)} more`;
980
1022
  }
981
1023
 
982
- // eslint/pasika/rules/component-placement.ts
1024
+ // eslint/rules/component-placement.ts
983
1025
  var REASON_TEXT = {
984
1026
  ccf: "that is the closest folder its consumers share",
985
1027
  "across-features": "its consumers span more than one feature, and no feature may import from another",
@@ -1032,7 +1074,7 @@ var componentPlacementRule = {
1032
1074
  }
1033
1075
  };
1034
1076
 
1035
- // eslint/pasika/rules/support-file-placement.ts
1077
+ // eslint/rules/support-file-placement.ts
1036
1078
  import path9 from "path";
1037
1079
  var CONFIG_OWNED_FOLDERS = /* @__PURE__ */ new Set(["types", "constants"]);
1038
1080
  var REASON_TEXT2 = {
@@ -1076,7 +1118,7 @@ var supportFilePlacementRule = {
1076
1118
  }
1077
1119
  };
1078
1120
 
1079
- // eslint/pasika/rules/application-structure.ts
1121
+ // eslint/rules/application-structure.ts
1080
1122
  import fs2 from "fs";
1081
1123
  import path10 from "path";
1082
1124
  var MODULE_EXTENSIONS2 = /* @__PURE__ */ new Set([".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"]);
@@ -1260,7 +1302,7 @@ var applicationStructureRule = {
1260
1302
  }
1261
1303
  };
1262
1304
 
1263
- // eslint/pasika/rules/named-exports.ts
1305
+ // eslint/rules/named-exports.ts
1264
1306
  import path11 from "path";
1265
1307
  var FRAMEWORK_DEFAULT_EXPORT_FILES = /* @__PURE__ */ new Set([
1266
1308
  "default",
@@ -1299,7 +1341,7 @@ var namedExportsRule = {
1299
1341
  }
1300
1342
  };
1301
1343
 
1302
- // eslint/pasika/rules/data-testid-case.ts
1344
+ // eslint/rules/data-testid-case.ts
1303
1345
  import path12 from "path";
1304
1346
  var NEXT_ROUTING_FILES2 = /* @__PURE__ */ new Set([
1305
1347
  "page",
@@ -1366,7 +1408,7 @@ function toKebabCase(value) {
1366
1408
  return value.replace(/(?<lower>[a-z0-9])(?<upper>[A-Z])/g, "$<lower>-$<upper>").replace(/(?<first>[A-Z])(?<rest>[A-Z][a-z])/g, "$<first>-$<rest>").toLowerCase();
1367
1409
  }
1368
1410
 
1369
- // eslint/pasika/rules/support-folder-shape.ts
1411
+ // eslint/rules/support-folder-shape.ts
1370
1412
  import fs3 from "fs";
1371
1413
  import path13 from "path";
1372
1414
  var SUPPORT_FOLDERS3 = /* @__PURE__ */ new Set(["constants", "types", "schemas"]);
@@ -1419,7 +1461,7 @@ var supportFolderShapeRule = {
1419
1461
  }
1420
1462
  };
1421
1463
 
1422
- // eslint/pasika/rules/import-through-index.ts
1464
+ // eslint/rules/import-through-index.ts
1423
1465
  import path14 from "path";
1424
1466
  var importThroughIndexRule = {
1425
1467
  meta: {
@@ -1469,7 +1511,7 @@ function sourceRootOf(filename) {
1469
1511
  return srcIndex >= 0 ? filename.slice(0, srcIndex + marker.length - 1) : path14.resolve("src");
1470
1512
  }
1471
1513
 
1472
- // eslint/pasika/rules/util-file-name.ts
1514
+ // eslint/rules/util-file-name.ts
1473
1515
  import path15 from "path";
1474
1516
  function toKebabCase2(value) {
1475
1517
  return value.replace(/(?<lower>[a-z0-9])(?<upper>[A-Z])/g, "$<lower>-$<upper>").replace(/(?<first>[A-Z])(?<rest>[A-Z][a-z])/g, "$<first>-$<rest>").toLowerCase();
@@ -1510,7 +1552,7 @@ var utilFileNameRule = {
1510
1552
  }
1511
1553
  };
1512
1554
 
1513
- // eslint/pasika/rules/no-util-barrel.ts
1555
+ // eslint/rules/no-util-barrel.ts
1514
1556
  import path16 from "path";
1515
1557
  var noUtilBarrelRule = {
1516
1558
  meta: {
@@ -1555,7 +1597,7 @@ function sourceRootOf2(filename) {
1555
1597
  return srcIndex >= 0 ? filename.slice(0, srcIndex + marker.length - 1) : path16.resolve("src");
1556
1598
  }
1557
1599
 
1558
- // eslint/pasika/rules/jsx-hygiene.ts
1600
+ // eslint/rules/jsx-hygiene.ts
1559
1601
  import ts3 from "typescript";
1560
1602
  var ARITHMETIC_OPERATORS = /* @__PURE__ */ new Set(["+", "-", "*", "/", "%"]);
1561
1603
  function isCallExpression(node) {
@@ -1644,7 +1686,7 @@ var jsxHygieneRule = {
1644
1686
  }
1645
1687
  };
1646
1688
 
1647
- // eslint/pasika/rules/interactive-component.ts
1689
+ // eslint/rules/interactive-component.ts
1648
1690
  var INTERACTIVE_TAGS = /* @__PURE__ */ new Set([
1649
1691
  "a",
1650
1692
  "button",
@@ -1708,7 +1750,7 @@ var interactiveComponentRule = {
1708
1750
  }
1709
1751
  };
1710
1752
 
1711
- // eslint/pasika/rules/ui-state.ts
1753
+ // eslint/rules/ui-state.ts
1712
1754
  var STATE_PROPS = /* @__PURE__ */ new Set([
1713
1755
  "disabled",
1714
1756
  "loading",
@@ -1795,7 +1837,7 @@ var uiStateRule = {
1795
1837
  }
1796
1838
  };
1797
1839
 
1798
- // eslint/pasika/rules/cva-appearance-props.ts
1840
+ // eslint/rules/cva-appearance-props.ts
1799
1841
  var VISUAL_OPTION_NAMES = /* @__PURE__ */ new Set([
1800
1842
  "size",
1801
1843
  "variant",
@@ -1853,7 +1895,7 @@ var cvaAppearancePropsRule = {
1853
1895
  }
1854
1896
  };
1855
1897
 
1856
- // eslint/pasika/rules/cva-boolean-variants.ts
1898
+ // eslint/rules/cva-boolean-variants.ts
1857
1899
  function extractCvaInfo(node) {
1858
1900
  if (node.callee.type !== "Identifier" || node.callee.name !== "cva") {
1859
1901
  return void 0;
@@ -1927,7 +1969,7 @@ var cvaBooleanVariantsRule = {
1927
1969
  }
1928
1970
  };
1929
1971
 
1930
- // eslint/pasika/rules/cross-feature-import.ts
1972
+ // eslint/rules/cross-feature-import.ts
1931
1973
  import path17 from "path";
1932
1974
  var FEATURES_SEGMENT = "features";
1933
1975
  function featureNameOf(resolvedPath, sourceRoot2) {
@@ -1985,7 +2027,7 @@ var crossFeatureImportRule = {
1985
2027
  }
1986
2028
  };
1987
2029
 
1988
- // eslint/pasika/rules/pure-function-extract.ts
2030
+ // eslint/rules/pure-function-extract.ts
1989
2031
  import path18 from "path";
1990
2032
  function isComponentLikeName(name) {
1991
2033
  return /^[A-Z]/.test(name);
@@ -2056,7 +2098,7 @@ var pureFunctionExtractRule = {
2056
2098
  }
2057
2099
  };
2058
2100
 
2059
- // eslint/pasika/rules/hook-complexity.ts
2101
+ // eslint/rules/hook-complexity.ts
2060
2102
  import path19 from "path";
2061
2103
  import ts4 from "typescript";
2062
2104
  var REACT_HOOKS = /* @__PURE__ */ new Set([
@@ -2153,7 +2195,7 @@ var hookComplexityRule = {
2153
2195
  }
2154
2196
  };
2155
2197
 
2156
- // eslint/pasika/rules/locale-dotted-path.ts
2198
+ // eslint/rules/locale-dotted-path.ts
2157
2199
  import path20 from "path";
2158
2200
  function isInLocalesDir(filename) {
2159
2201
  const segments = path20.resolve(filename).split(path20.sep);
@@ -2204,7 +2246,7 @@ var localeDottedPathRule = {
2204
2246
  }
2205
2247
  };
2206
2248
 
2207
- // eslint/pasika/rules/locales-location.ts
2249
+ // eslint/rules/locales-location.ts
2208
2250
  import path21 from "path";
2209
2251
  function isLocalesFile(filename) {
2210
2252
  const segments = path21.resolve(filename).split(path21.sep);
@@ -2247,7 +2289,7 @@ var localesLocationRule = {
2247
2289
  }
2248
2290
  };
2249
2291
 
2250
- // eslint/pasika/rules/hook-extraction.ts
2292
+ // eslint/rules/hook-extraction.ts
2251
2293
  import path22 from "path";
2252
2294
  var hookExtractionRule = {
2253
2295
  meta: {
@@ -2284,7 +2326,7 @@ var hookExtractionRule = {
2284
2326
  }
2285
2327
  };
2286
2328
 
2287
- // eslint/pasika/rules/value-extraction.ts
2329
+ // eslint/rules/value-extraction.ts
2288
2330
  import path23 from "path";
2289
2331
  var valueExtractionRule = {
2290
2332
  meta: {
@@ -2316,7 +2358,7 @@ var valueExtractionRule = {
2316
2358
  }
2317
2359
  };
2318
2360
 
2319
- // eslint/pasika/rules/config-extraction.ts
2361
+ // eslint/rules/config-extraction.ts
2320
2362
  import path24 from "path";
2321
2363
  var configExtractionRule = {
2322
2364
  meta: {
@@ -2365,7 +2407,7 @@ var configExtractionRule = {
2365
2407
  }
2366
2408
  };
2367
2409
 
2368
- // eslint/pasika/rules/component-nesting.ts
2410
+ // eslint/rules/component-nesting.ts
2369
2411
  import path25 from "path";
2370
2412
  var componentNestingRule = {
2371
2413
  meta: {
@@ -2409,7 +2451,7 @@ var componentNestingRule = {
2409
2451
  }
2410
2452
  };
2411
2453
 
2412
- // eslint/pasika/rules/stay-flat.ts
2454
+ // eslint/rules/stay-flat.ts
2413
2455
  import path26 from "path";
2414
2456
  var stayFlatRule = {
2415
2457
  meta: {
@@ -2460,7 +2502,7 @@ var stayFlatRule = {
2460
2502
  }
2461
2503
  };
2462
2504
 
2463
- // eslint/pasika/rules/type-extraction.ts
2505
+ // eslint/rules/type-extraction.ts
2464
2506
  import path27 from "path";
2465
2507
  var typeExtractionRule = {
2466
2508
  meta: {
@@ -2517,7 +2559,7 @@ var typeExtractionRule = {
2517
2559
  }
2518
2560
  };
2519
2561
 
2520
- // eslint/pasika/rules/locale-placement.ts
2562
+ // eslint/rules/locale-placement.ts
2521
2563
  import path28 from "path";
2522
2564
  import { readFileSync as readFileSync2 } from "fs";
2523
2565
  import ts5 from "typescript";
@@ -2643,7 +2685,7 @@ var localePlacementRule = {
2643
2685
  }
2644
2686
  };
2645
2687
 
2646
- // eslint/pasika/rules/sole-state-owner.ts
2688
+ // eslint/rules/sole-state-owner.ts
2647
2689
  import path29 from "path";
2648
2690
  import ts6 from "typescript";
2649
2691
  function findStateHooks(node) {
@@ -2802,7 +2844,7 @@ function usesOutsideJsx(declaration, hook, children) {
2802
2844
  return outside;
2803
2845
  }
2804
2846
 
2805
- // eslint/pasika/rules/locale-key-shape.ts
2847
+ // eslint/rules/locale-key-shape.ts
2806
2848
  import path30 from "path";
2807
2849
  var MAX_KEY_LENGTH = 30;
2808
2850
  var ROLE_POSTFIXES = /* @__PURE__ */ new Set([
@@ -2914,7 +2956,7 @@ var localeKeyShapeRule = {
2914
2956
  }
2915
2957
  };
2916
2958
 
2917
- // eslint/pasika/rules/shared-style-dedup.ts
2959
+ // eslint/rules/shared-style-dedup.ts
2918
2960
  import path31 from "path";
2919
2961
  import { readFileSync as readFileSync3, statSync as statSync2 } from "fs";
2920
2962
  var CLASS_NAME = /className="(?<classes>[^"]+)"/g;
@@ -2979,7 +3021,7 @@ var sharedStyleDedupRule = {
2979
3021
  }
2980
3022
  };
2981
3023
 
2982
- // eslint/pasika/rules/repeated-structure.ts
3024
+ // eslint/rules/repeated-structure.ts
2983
3025
  function nodeKind(node) {
2984
3026
  return node.type;
2985
3027
  }
@@ -3087,7 +3129,7 @@ var repeatedStructureRule = {
3087
3129
  }
3088
3130
  };
3089
3131
 
3090
- // eslint/pasika/rules/zod-schema-validation.ts
3132
+ // eslint/rules/zod-schema-validation.ts
3091
3133
  var NON_SCHEMA_OBJECTS = /* @__PURE__ */ new Set(["JSON", "Date", "Number"]);
3092
3134
  var SCHEMA_METHODS = /* @__PURE__ */ new Set(["safeParse", "parse", "assert"]);
3093
3135
  function isRecord(value) {
@@ -3160,7 +3202,7 @@ var zodSchemaValidationRule = {
3160
3202
  }
3161
3203
  };
3162
3204
 
3163
- // eslint/pasika/rules/source-under-src.ts
3205
+ // eslint/rules/source-under-src.ts
3164
3206
  import path32 from "path";
3165
3207
  var NON_SOURCE_ROOT_DIRS = /* @__PURE__ */ new Set([
3166
3208
  ".agents",
@@ -3224,7 +3266,7 @@ var sourceUnderSrcRule = {
3224
3266
  }
3225
3267
  };
3226
3268
 
3227
- // eslint/pasika/rules/config-baseline.ts
3269
+ // eslint/rules/config-baseline.ts
3228
3270
  import fs4 from "fs";
3229
3271
  import path33 from "path";
3230
3272
  var configBaselineRule = {
@@ -3262,10 +3304,13 @@ var configBaselineRule = {
3262
3304
  }
3263
3305
  };
3264
3306
 
3265
- // eslint/pasika/rules/md/helpers.ts
3266
- var RFC_PATTERN = /\b(?<keyword>MUST NOT|MUST|SHALL NOT|SHALL|SHOULD NOT|SHOULD|MAY|RECOMMENDED|NOT RECOMMENDED|OPTIONAL|REQUIRED)\b/;
3307
+ // constants/rfc2119.ts
3308
+ var RFC_2119_KEYWORDS = ["MUST NOT", "MUST", "SHOULD NOT", "SHOULD", "MAY"];
3309
+ var RFC_2119_PATTERN = new RegExp(`\\b(?<keyword>${RFC_2119_KEYWORDS.join("|")})\\b`);
3310
+
3311
+ // eslint/rules/documentation/helpers.ts
3267
3312
  function containsRfcKeyword(text) {
3268
- const match = RFC_PATTERN.exec(text);
3313
+ const match = RFC_2119_PATTERN.exec(text);
3269
3314
  return match?.groups?.keyword ?? null;
3270
3315
  }
3271
3316
  function getFilename(context) {
@@ -3282,7 +3327,7 @@ function getLine(node) {
3282
3327
  return node.position?.start.line ?? 0;
3283
3328
  }
3284
3329
 
3285
- // eslint/pasika/rules/md/doc-kind-suffix.ts
3330
+ // eslint/rules/documentation/doc-kind-suffix.ts
3286
3331
  var docKindSuffixRule = {
3287
3332
  meta: {
3288
3333
  type: "problem",
@@ -3308,7 +3353,7 @@ var docKindSuffixRule = {
3308
3353
  }
3309
3354
  };
3310
3355
 
3311
- // eslint/pasika/rules/md/title-matches-file-name.ts
3356
+ // eslint/rules/documentation/title-matches-file-name.ts
3312
3357
  import path34 from "path";
3313
3358
  function toExpectedFileName(title) {
3314
3359
  return `${title.toLowerCase().replaceAll(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "")}.md`;
@@ -3346,7 +3391,7 @@ var titleMatchesFileNameRule = {
3346
3391
  }
3347
3392
  };
3348
3393
 
3349
- // eslint/pasika/rules/md/overview-present.ts
3394
+ // eslint/rules/documentation/overview-present.ts
3350
3395
  var overviewPresentRule = {
3351
3396
  meta: {
3352
3397
  type: "problem",
@@ -3386,7 +3431,7 @@ var overviewPresentRule = {
3386
3431
  }
3387
3432
  };
3388
3433
 
3389
- // eslint/pasika/rules/md/overview-length.ts
3434
+ // eslint/rules/documentation/overview-length.ts
3390
3435
  function countSentences(text) {
3391
3436
  return text.split(/[.!?](?:\s+|$)/).filter((part) => part.trim() !== "").length;
3392
3437
  }
@@ -3429,7 +3474,7 @@ var overviewLengthRule = {
3429
3474
  }
3430
3475
  };
3431
3476
 
3432
- // eslint/pasika/rules/md/guide-overview-no-links.ts
3477
+ // eslint/rules/documentation/guide-overview-no-links.ts
3433
3478
  function containsLink(node) {
3434
3479
  if (node.type === "link") return true;
3435
3480
  if ("children" in node) {
@@ -3475,7 +3520,7 @@ var guideOverviewNoLinksRule = {
3475
3520
  }
3476
3521
  };
3477
3522
 
3478
- // eslint/pasika/rules/md/guide-step-single-sentence.ts
3523
+ // eslint/rules/documentation/guide-step-single-sentence.ts
3479
3524
  function countSentences2(text) {
3480
3525
  return text.split(/[.!?](?:\s+|$)/).filter((part) => part.trim() !== "").length;
3481
3526
  }
@@ -3513,7 +3558,7 @@ var guideStepSingleSentenceRule = {
3513
3558
  }
3514
3559
  };
3515
3560
 
3516
- // eslint/pasika/rules/md/guide-step-single-link.ts
3561
+ // eslint/rules/documentation/guide-step-single-link.ts
3517
3562
  function countDocLinks(node) {
3518
3563
  if (node.type === "link" && node.url.endsWith(".md")) return 1;
3519
3564
  if ("children" in node) {
@@ -3556,7 +3601,7 @@ var guideStepSingleLinkRule = {
3556
3601
  }
3557
3602
  };
3558
3603
 
3559
- // eslint/pasika/rules/md/guide-states-no-requirement.ts
3604
+ // eslint/rules/documentation/guide-states-no-requirement.ts
3560
3605
  var guideStatesNoRequirementRule = {
3561
3606
  meta: {
3562
3607
  type: "problem",
@@ -3582,7 +3627,7 @@ var guideStatesNoRequirementRule = {
3582
3627
  }
3583
3628
  };
3584
3629
 
3585
- // eslint/pasika/rules/md/requirement-present.ts
3630
+ // eslint/rules/documentation/requirement-present.ts
3586
3631
  function hasRequirement(node) {
3587
3632
  if (node.type === "listItem") {
3588
3633
  if (containsRfcKeyword(getTextContent(node))) return true;
@@ -3621,7 +3666,7 @@ var requirementPresentRule = {
3621
3666
  }
3622
3667
  };
3623
3668
 
3624
- // eslint/pasika/rules/md/rule-paired-examples.ts
3669
+ // eslint/rules/documentation/rule-paired-examples.ts
3625
3670
  var rulePairedExamplesRule = {
3626
3671
  meta: {
3627
3672
  type: "problem",
@@ -3657,7 +3702,7 @@ var rulePairedExamplesRule = {
3657
3702
  }
3658
3703
  };
3659
3704
 
3660
- // eslint/pasika/rules/md/example-heading-description.ts
3705
+ // eslint/rules/documentation/example-heading-description.ts
3661
3706
  var exampleHeadingDescriptionRule = {
3662
3707
  meta: {
3663
3708
  type: "problem",
@@ -3685,7 +3730,7 @@ var exampleHeadingDescriptionRule = {
3685
3730
  }
3686
3731
  };
3687
3732
 
3688
- // eslint/pasika/rules/md/policy-no-examples.ts
3733
+ // eslint/rules/documentation/policy-no-examples.ts
3689
3734
  var policyNoExamplesRule = {
3690
3735
  meta: {
3691
3736
  type: "problem",
@@ -3712,7 +3757,7 @@ var policyNoExamplesRule = {
3712
3757
  }
3713
3758
  };
3714
3759
 
3715
- // eslint/pasika/rules/md/no-cross-document-link.ts
3760
+ // eslint/rules/documentation/no-cross-document-link.ts
3716
3761
  function linkedKind(filename) {
3717
3762
  if (filename.endsWith("-rule.md")) return "rule";
3718
3763
  if (filename.endsWith("-reference.md")) return "reference";
@@ -3744,7 +3789,7 @@ var noCrossDocumentLinkRule = {
3744
3789
  }
3745
3790
  };
3746
3791
 
3747
- // eslint/pasika/rules/md/reference-no-rfc-vocabulary.ts
3792
+ // eslint/rules/documentation/reference-no-rfc-vocabulary.ts
3748
3793
  var referenceNoRfcVocabularyRule = {
3749
3794
  meta: {
3750
3795
  type: "problem",
@@ -3770,7 +3815,7 @@ var referenceNoRfcVocabularyRule = {
3770
3815
  }
3771
3816
  };
3772
3817
 
3773
- // eslint/pasika/rules/md/reference-block-headings.ts
3818
+ // eslint/rules/documentation/reference-block-headings.ts
3774
3819
  var referenceBlockHeadingsRule = {
3775
3820
  meta: {
3776
3821
  type: "problem",
@@ -3801,7 +3846,7 @@ var referenceBlockHeadingsRule = {
3801
3846
  }
3802
3847
  };
3803
3848
 
3804
- // eslint/pasika/rules/md/support-document-placement.ts
3849
+ // eslint/rules/documentation/support-document-placement.ts
3805
3850
  import path35 from "path";
3806
3851
  var supportDocumentPlacementRule = {
3807
3852
  meta: {
@@ -3834,7 +3879,7 @@ var supportDocumentPlacementRule = {
3834
3879
  }
3835
3880
  };
3836
3881
 
3837
- // eslint/pasika/rules/md/no-template-prompt.ts
3882
+ // eslint/rules/documentation/no-template-prompt.ts
3838
3883
  var TEMPLATE_PROMPT = /^\s*\[[A-Z0-9].*\]\s*$/;
3839
3884
  var noTemplatePromptRule = {
3840
3885
  meta: {
@@ -3858,10 +3903,10 @@ var noTemplatePromptRule = {
3858
3903
  }
3859
3904
  };
3860
3905
 
3861
- // eslint/pasika/rules/md/guide-folder-entry-point.ts
3906
+ // eslint/rules/documentation/guide-folder-entry-point.ts
3862
3907
  import path37 from "path";
3863
3908
 
3864
- // eslint/pasika/rules/md/project-index.ts
3909
+ // eslint/rules/documentation/project-index.ts
3865
3910
  import { readdirSync as readdirSync2, readFileSync as readFileSync4, statSync as statSync3 } from "fs";
3866
3911
  import path36 from "path";
3867
3912
  var KIND_BY_SUFFIX = [
@@ -3915,7 +3960,7 @@ function findDocsRoot(filePath) {
3915
3960
  }
3916
3961
  }
3917
3962
 
3918
- // eslint/pasika/rules/md/guide-folder-entry-point.ts
3963
+ // eslint/rules/documentation/guide-folder-entry-point.ts
3919
3964
  var guideFolderEntryPointRule = {
3920
3965
  meta: {
3921
3966
  type: "problem",
@@ -3953,7 +3998,7 @@ var guideFolderEntryPointRule = {
3953
3998
  }
3954
3999
  };
3955
4000
 
3956
- // eslint/pasika/rules/md/rfc-only-in-bullets.ts
4001
+ // eslint/rules/documentation/rfc-only-in-bullets.ts
3957
4002
  function checkOutsideBullets(node, context, insideBullet) {
3958
4003
  if (node.type === "listItem") {
3959
4004
  for (const child of node.children) {
@@ -3996,7 +4041,7 @@ var rfcOnlyInBulletsRule = {
3996
4041
  }
3997
4042
  };
3998
4043
 
3999
- // eslint/pasika/rules/md/rfc-keyword-in-every-bullet.ts
4044
+ // eslint/rules/documentation/rfc-keyword-in-every-bullet.ts
4000
4045
  function checkBullets(node, context) {
4001
4046
  if (node.type === "listItem" && !containsRfcKeyword(getTextContent(node))) {
4002
4047
  context.report({
@@ -4029,7 +4074,7 @@ var rfcKeywordInEveryBulletRule = {
4029
4074
  }
4030
4075
  };
4031
4076
 
4032
- // eslint/pasika/rules/md/policy-subject-headings.ts
4077
+ // eslint/rules/documentation/policy-subject-headings.ts
4033
4078
  var policySubjectHeadingsRule = {
4034
4079
  meta: {
4035
4080
  type: "problem",
@@ -4082,7 +4127,7 @@ var policySubjectHeadingsRule = {
4082
4127
  }
4083
4128
  };
4084
4129
 
4085
- // eslint/pasika/rules/md/guide-link-anchors.ts
4130
+ // eslint/rules/documentation/guide-link-anchors.ts
4086
4131
  function visitSteps2(node, check) {
4087
4132
  if (node.type === "list" && node.ordered) {
4088
4133
  for (const child of node.children) check(child);
@@ -4126,7 +4171,7 @@ var guideLinkAnchorsRule = {
4126
4171
  }
4127
4172
  };
4128
4173
 
4129
- // eslint/pasika/rules/md/no-nested-how-to.ts
4174
+ // eslint/rules/documentation/no-nested-how-to.ts
4130
4175
  var noNestedHowToRule = {
4131
4176
  meta: {
4132
4177
  type: "problem",
@@ -4162,7 +4207,7 @@ var noNestedHowToRule = {
4162
4207
  }
4163
4208
  };
4164
4209
 
4165
- // eslint/pasika/rules/md/glossary-term-linking.ts
4210
+ // eslint/rules/documentation/glossary-term-linking.ts
4166
4211
  import { readFileSync as readFileSync5 } from "fs";
4167
4212
  import path38 from "path";
4168
4213
  function extractGlossaryTerms(filePath) {
@@ -4243,8 +4288,8 @@ var glossaryTermLinkingRule = {
4243
4288
  }
4244
4289
  };
4245
4290
 
4246
- // eslint/pasika/rules/md/index.ts
4247
- var mdRules = {
4291
+ // eslint/rules/documentation/index.ts
4292
+ var documentationRules = {
4248
4293
  "doc-kind-suffix": docKindSuffixRule,
4249
4294
  "title-matches-file-name": titleMatchesFileNameRule,
4250
4295
  "overview-present": overviewPresentRule,
@@ -4271,7 +4316,7 @@ var mdRules = {
4271
4316
  "glossary-term-linking": glossaryTermLinkingRule
4272
4317
  };
4273
4318
 
4274
- // eslint/pasika/rules/css/helpers.ts
4319
+ // eslint/rules/tailwind/helpers.ts
4275
4320
  function walkNodes(node, visit) {
4276
4321
  visit(node);
4277
4322
  if ("children" in node && node.children) {
@@ -4328,7 +4373,7 @@ function selectorNames(node) {
4328
4373
  return names;
4329
4374
  }
4330
4375
 
4331
- // eslint/pasika/rules/css/theme-reset.ts
4376
+ // eslint/rules/tailwind/theme-reset.ts
4332
4377
  var themeResetRule = {
4333
4378
  meta: {
4334
4379
  schema: [],
@@ -4358,7 +4403,7 @@ var themeResetRule = {
4358
4403
  }
4359
4404
  };
4360
4405
 
4361
- // eslint/pasika/rules/css/root-variables.ts
4406
+ // eslint/rules/tailwind/root-variables.ts
4362
4407
  var rootVariablesRule = {
4363
4408
  meta: {
4364
4409
  schema: [],
@@ -4401,7 +4446,7 @@ var rootVariablesRule = {
4401
4446
  }
4402
4447
  };
4403
4448
 
4404
- // eslint/pasika/rules/css/apply-usage.ts
4449
+ // eslint/rules/tailwind/apply-usage.ts
4405
4450
  var applyUsageRule = {
4406
4451
  meta: {
4407
4452
  schema: [],
@@ -4431,7 +4476,7 @@ var applyUsageRule = {
4431
4476
  }
4432
4477
  };
4433
4478
 
4434
- // eslint/pasika/rules/css/base-layer-pair.ts
4479
+ // eslint/rules/tailwind/base-layer-pair.ts
4435
4480
  var baseLayerPairRule = {
4436
4481
  meta: {
4437
4482
  schema: [],
@@ -4469,7 +4514,7 @@ var baseLayerPairRule = {
4469
4514
  }
4470
4515
  };
4471
4516
 
4472
- // eslint/pasika/rules/css/stylesheet-ordering.ts
4517
+ // eslint/rules/tailwind/stylesheet-ordering.ts
4473
4518
  var SECTION_ORDER = ["imports", "custom-variant", "root", "theme", "utility", "base styles", "keyframes"];
4474
4519
  var stylesheetOrderingRule = {
4475
4520
  meta: {
@@ -4526,7 +4571,7 @@ var stylesheetOrderingRule = {
4526
4571
  }
4527
4572
  };
4528
4573
 
4529
- // eslint/pasika/rules/css/css-variable-naming.ts
4574
+ // eslint/rules/tailwind/css-variable-naming.ts
4530
4575
  var cssVariableNamingRule = {
4531
4576
  meta: {
4532
4577
  schema: [],
@@ -4558,7 +4603,7 @@ var cssVariableNamingRule = {
4558
4603
  }
4559
4604
  };
4560
4605
 
4561
- // eslint/pasika/rules/css/custom-utility-apply.ts
4606
+ // eslint/rules/tailwind/custom-utility-apply.ts
4562
4607
  function rawProperty(raw) {
4563
4608
  const match = /^\s*(?<property>[a-z][a-z-]*)\s*:/.exec(raw);
4564
4609
  return match?.groups?.property;
@@ -4600,7 +4645,7 @@ var customUtilityApplyRule = {
4600
4645
  }
4601
4646
  };
4602
4647
 
4603
- // eslint/pasika/rules/css/surface-utility.ts
4648
+ // eslint/rules/tailwind/surface-utility.ts
4604
4649
  var surfaceUtilityRule = {
4605
4650
  meta: {
4606
4651
  schema: [],
@@ -4633,7 +4678,7 @@ var surfaceUtilityRule = {
4633
4678
  }
4634
4679
  };
4635
4680
 
4636
- // eslint/pasika/rules/css/theme-variable-namespace.ts
4681
+ // eslint/rules/tailwind/theme-variable-namespace.ts
4637
4682
  var themeVariableNamespaceRule = {
4638
4683
  meta: {
4639
4684
  schema: [],
@@ -4672,7 +4717,7 @@ var themeVariableNamespaceRule = {
4672
4717
  }
4673
4718
  };
4674
4719
 
4675
- // eslint/pasika/rules/css/global-css-location.ts
4720
+ // eslint/rules/tailwind/global-css-location.ts
4676
4721
  var globalCssLocationRule = {
4677
4722
  meta: {
4678
4723
  schema: [],
@@ -4703,7 +4748,7 @@ var globalCssLocationRule = {
4703
4748
  }
4704
4749
  };
4705
4750
 
4706
- // eslint/pasika/rules/css/global-stylesheet.ts
4751
+ // eslint/rules/tailwind/global-stylesheet.ts
4707
4752
  var globalStylesheetRule = {
4708
4753
  meta: {
4709
4754
  schema: [],
@@ -4736,8 +4781,8 @@ var globalStylesheetRule = {
4736
4781
  }
4737
4782
  };
4738
4783
 
4739
- // eslint/pasika/rules/css/index.ts
4740
- var cssRules = {
4784
+ // eslint/rules/tailwind/index.ts
4785
+ var tailwindRules = {
4741
4786
  "theme-reset": themeResetRule,
4742
4787
  "root-variables": rootVariablesRule,
4743
4788
  "apply-usage": applyUsageRule,
@@ -4751,10 +4796,50 @@ var cssRules = {
4751
4796
  "global-stylesheet": globalStylesheetRule
4752
4797
  };
4753
4798
 
4754
- // eslint/pasika/rules/json/no-vulyk-dependency.ts
4799
+ // eslint/rules/package-json/exact-version.ts
4755
4800
  function memberName(member) {
4756
4801
  return member.name.type === "String" ? member.name.value : member.name.name;
4757
4802
  }
4803
+ var EXACT_VERSION_PATTERN = /^\d+\.\d+\.\d+$/;
4804
+ function memberValue(member) {
4805
+ return member.value.type === "String" ? member.value.value : null;
4806
+ }
4807
+ var exactVersionRule = {
4808
+ meta: {
4809
+ schema: [],
4810
+ type: "problem",
4811
+ docs: {
4812
+ description: "Require dependency and devDependency versions to be pinned exactly."
4813
+ }
4814
+ },
4815
+ create(context) {
4816
+ return {
4817
+ Document(node) {
4818
+ const root = node.body;
4819
+ if (root.type !== "Object") return;
4820
+ for (const key of ["dependencies", "devDependencies"]) {
4821
+ const section = root.members.find((member) => memberName(member) === key);
4822
+ if (section?.value.type !== "Object") continue;
4823
+ for (const member of section.value.members) {
4824
+ const version = memberValue(member);
4825
+ if (version === null) continue;
4826
+ if (!EXACT_VERSION_PATTERN.test(version)) {
4827
+ context.report({
4828
+ node: member,
4829
+ message: `${memberName(member)} must pin an exact version (e.g. "1.2.3"), not a range or cap such as "${version}".`
4830
+ });
4831
+ }
4832
+ }
4833
+ }
4834
+ }
4835
+ };
4836
+ }
4837
+ };
4838
+
4839
+ // eslint/rules/package-json/no-vulyk-dependency.ts
4840
+ function memberName2(member) {
4841
+ return member.name.type === "String" ? member.name.value : member.name.name;
4842
+ }
4758
4843
  var noVulykDependencyRule = {
4759
4844
  meta: {
4760
4845
  schema: [],
@@ -4769,9 +4854,9 @@ var noVulykDependencyRule = {
4769
4854
  const root = node.body;
4770
4855
  if (root.type !== "Object") return;
4771
4856
  for (const key of ["dependencies", "devDependencies"]) {
4772
- const section = root.members.find((member) => memberName(member) === key);
4857
+ const section = root.members.find((member) => memberName2(member) === key);
4773
4858
  if (section?.value.type !== "Object") continue;
4774
- const vulyk = section.value.members.find((member) => memberName(member) === "vulyk");
4859
+ const vulyk = section.value.members.find((member) => memberName2(member) === "vulyk");
4775
4860
  if (vulyk) {
4776
4861
  context.report({
4777
4862
  node: vulyk,
@@ -4784,16 +4869,39 @@ var noVulykDependencyRule = {
4784
4869
  }
4785
4870
  };
4786
4871
 
4787
- // eslint/pasika/rules/json/zirka-installed.ts
4788
- function memberName2(member) {
4872
+ // eslint/rules/package-json/nextjs-stack.ts
4873
+ var NEXTJS_STACK_DEPENDENCIES = [
4874
+ "next",
4875
+ "react",
4876
+ "react-dom",
4877
+ "zod",
4878
+ "class-variance-authority",
4879
+ "clsx",
4880
+ "tailwind-merge"
4881
+ ];
4882
+ var NEXTJS_STACK_DEV_DEPENDENCIES = [
4883
+ "typescript",
4884
+ "tailwindcss",
4885
+ "eslint",
4886
+ "prettier",
4887
+ "husky",
4888
+ "lint-staged",
4889
+ "zirka"
4890
+ ];
4891
+ function memberName3(member) {
4789
4892
  return member.name.type === "String" ? member.name.value : member.name.name;
4790
4893
  }
4791
- var zirkaInstalledRule = {
4894
+ function sectionPackages(root, section) {
4895
+ const member = root.type === "Object" ? root.members.find((entry) => memberName3(entry) === section) : void 0;
4896
+ if (member?.value.type !== "Object") return /* @__PURE__ */ new Set();
4897
+ return new Set(member.value.members.map(memberName3));
4898
+ }
4899
+ var nextjsStackRule = {
4792
4900
  meta: {
4793
4901
  schema: [],
4794
4902
  type: "problem",
4795
4903
  docs: {
4796
- description: "Require zirka to be listed in package.json as a devDependency."
4904
+ description: "Require the framework's runtime packages in dependencies and toolchain packages in devDependencies."
4797
4905
  }
4798
4906
  },
4799
4907
  create(context) {
@@ -4801,18 +4909,20 @@ var zirkaInstalledRule = {
4801
4909
  Document(node) {
4802
4910
  const root = node.body;
4803
4911
  if (root.type !== "Object") return;
4804
- const allDeps = [];
4805
- for (const key of ["dependencies", "devDependencies"]) {
4806
- const section = root.members.find((member) => memberName2(member) === key);
4807
- if (section?.value.type !== "Object") continue;
4808
- for (const member of section.value.members) {
4809
- allDeps.push(memberName2(member));
4810
- }
4912
+ const dependencies = sectionPackages(root, "dependencies");
4913
+ const devDependencies = sectionPackages(root, "devDependencies");
4914
+ for (const pkg of NEXTJS_STACK_DEPENDENCIES) {
4915
+ if (dependencies.has(pkg)) continue;
4916
+ context.report({
4917
+ node,
4918
+ message: `${pkg} must be listed in package.json as a dependency.`
4919
+ });
4811
4920
  }
4812
- if (!allDeps.includes("zirka")) {
4921
+ for (const pkg of NEXTJS_STACK_DEV_DEPENDENCIES) {
4922
+ if (devDependencies.has(pkg)) continue;
4813
4923
  context.report({
4814
4924
  node,
4815
- message: "zirka must be listed in package.json as a devDependency."
4925
+ message: `${pkg} must be listed in package.json as a devDependency.`
4816
4926
  });
4817
4927
  }
4818
4928
  }
@@ -4820,76 +4930,201 @@ var zirkaInstalledRule = {
4820
4930
  }
4821
4931
  };
4822
4932
 
4823
- // eslint/pasika/rules/json/index.ts
4824
- var jsonRules = {
4933
+ // eslint/rules/package-json/index.ts
4934
+ var repoPackageJsonRules = {
4825
4935
  "no-vulyk-dependency": noVulykDependencyRule,
4826
- "zirka-installed": zirkaInstalledRule
4936
+ "exact-version": exactVersionRule
4937
+ };
4938
+ var nextPackageJsonRules = {
4939
+ "nextjs-stack": nextjsStackRule
4827
4940
  };
4828
4941
 
4829
- // eslint/pasika/index.ts
4830
- var pasikaRules = {
4831
- "component-placement": componentPlacementRule,
4832
- "support-file-placement": supportFilePlacementRule,
4833
- "application-structure": applicationStructureRule,
4942
+ // eslint/rules/husky/husky-hook.ts
4943
+ import { existsSync, readFileSync as readFileSync6 } from "fs";
4944
+ import path39 from "path";
4945
+ function memberName4(member) {
4946
+ return member.name.type === "String" ? member.name.value : member.name.name;
4947
+ }
4948
+ var huskyHookRule = {
4949
+ meta: {
4950
+ schema: [],
4951
+ type: "problem",
4952
+ docs: {
4953
+ description: "Require a pre-commit hook that runs lint-staged, typecheck, and the libyear drift check."
4954
+ }
4955
+ },
4956
+ create(context) {
4957
+ return {
4958
+ Document(node) {
4959
+ const root = node.body;
4960
+ if (root.type !== "Object") return;
4961
+ const scriptName = context.filename;
4962
+ if (!scriptName.endsWith("package.json")) return;
4963
+ const hookPath = path39.join(process.cwd(), ".husky", "pre-commit");
4964
+ if (!existsSync(hookPath)) {
4965
+ context.report({
4966
+ node,
4967
+ message: "No .husky/pre-commit hook found. Configure husky to run checks before commits."
4968
+ });
4969
+ return;
4970
+ }
4971
+ const content = readFileSync6(hookPath, "utf8");
4972
+ if (!content.includes("lint-staged")) {
4973
+ context.report({ node, message: ".husky/pre-commit must run lint-staged." });
4974
+ }
4975
+ if (!content.includes("typecheck")) {
4976
+ context.report({ node, message: ".husky/pre-commit must run npm run typecheck." });
4977
+ }
4978
+ if (!content.includes("libyear --limit-major-individual=1")) {
4979
+ context.report({ node, message: ".husky/pre-commit must run npx libyear --limit-major-individual=1." });
4980
+ }
4981
+ const scripts = root.members.find((member) => memberName4(member) === "scripts");
4982
+ if (scripts?.value.type === "Object") {
4983
+ const prepare = scripts.value.members.find((member) => memberName4(member) === "prepare");
4984
+ if (prepare?.value.type === "String" && !prepare.value.value.includes("husky")) {
4985
+ context.report({
4986
+ node: prepare,
4987
+ message: 'package.json "prepare" script must run husky (e.g. "prepare": "husky").'
4988
+ });
4989
+ }
4990
+ }
4991
+ }
4992
+ };
4993
+ }
4994
+ };
4995
+
4996
+ // eslint/rules/husky/index.ts
4997
+ var huskyRules = {
4998
+ "husky-hook": huskyHookRule
4999
+ };
5000
+
5001
+ // eslint/index.ts
5002
+ var repoSourceRules = {
5003
+ "filename-case": filenameCaseRule,
5004
+ "import-boundaries": importBoundariesRule,
4834
5005
  "named-exports": namedExportsRule,
4835
- "data-testid-case": dataTestIdCaseRule,
5006
+ "support-file-placement": supportFilePlacementRule,
4836
5007
  "support-folder-shape": supportFolderShapeRule,
4837
5008
  "import-through-index": importThroughIndexRule,
4838
5009
  "util-file-name": utilFileNameRule,
4839
5010
  "no-util-barrel": noUtilBarrelRule,
5011
+ "enforce-barrel-exports": enforceBarrelExportsRule,
5012
+ "config-extraction": configExtractionRule,
5013
+ "value-extraction": valueExtractionRule,
5014
+ "type-extraction": typeExtractionRule,
5015
+ "zod-schema-validation": zodSchemaValidationRule,
5016
+ "source-under-src": sourceUnderSrcRule,
5017
+ "config-baseline": configBaselineRule
5018
+ };
5019
+ var nextSourceRules = {
5020
+ "component-placement": componentPlacementRule,
5021
+ "application-structure": applicationStructureRule,
5022
+ "data-testid-case": dataTestIdCaseRule,
4840
5023
  "jsx-hygiene": jsxHygieneRule,
4841
5024
  "interactive-component": interactiveComponentRule,
4842
5025
  "ui-state": uiStateRule,
4843
- "filename-case": filenameCaseRule,
4844
- "import-boundaries": importBoundariesRule,
4845
5026
  "no-mixed-concerns": noMixedConcernsRule,
4846
5027
  "no-arbitrary-tailwind": noArbitraryTailwindRule,
4847
5028
  "enforce-cn-merge": enforceCnMergeRule,
5029
+ "cn-helper": cnHelperRule,
4848
5030
  "enforce-cva-variant-props": enforceCvaVariantPropsRule,
4849
5031
  "cva-appearance-props": cvaAppearancePropsRule,
4850
5032
  "cva-boolean-variants": cvaBooleanVariantsRule,
4851
- "enforce-barrel-exports": enforceBarrelExportsRule,
4852
5033
  "cross-feature-import": crossFeatureImportRule,
4853
5034
  "pure-function-extract": pureFunctionExtractRule,
4854
5035
  "hook-complexity": hookComplexityRule,
4855
5036
  "locale-dotted-path": localeDottedPathRule,
4856
5037
  "locales-location": localesLocationRule,
4857
5038
  "hook-extraction": hookExtractionRule,
4858
- "value-extraction": valueExtractionRule,
4859
- "config-extraction": configExtractionRule,
4860
5039
  "component-nesting": componentNestingRule,
4861
5040
  "stay-flat": stayFlatRule,
4862
- "type-extraction": typeExtractionRule,
4863
5041
  "locale-placement": localePlacementRule,
4864
5042
  "sole-state-owner": soleStateOwnerRule,
4865
5043
  "locale-key-shape": localeKeyShapeRule,
4866
5044
  "shared-style-dedup": sharedStyleDedupRule,
4867
- "repeated-structure": repeatedStructureRule,
4868
- "zod-schema-validation": zodSchemaValidationRule,
4869
- "source-under-src": sourceUnderSrcRule,
4870
- "config-baseline": configBaselineRule
5045
+ "repeated-structure": repeatedStructureRule
5046
+ };
5047
+ var pasikaRules = {
5048
+ ...repoSourceRules,
5049
+ ...nextSourceRules
4871
5050
  };
4872
- var pasikaRuleIds = Object.keys(pasikaRules).map((name) => `pasika/${name}`);
4873
- var pasikaMdRuleIds = Object.keys(mdRules).map((name) => `pasika/${name}`);
4874
- var pasikaCssRuleIds = Object.keys(cssRules).map((name) => `pasika/${name}`);
4875
- var pasikaJsonRuleIds = Object.keys(jsonRules).map((name) => `pasika/${name}`);
4876
- var allPasikaRuleIds = [...pasikaRuleIds, ...pasikaMdRuleIds, ...pasikaCssRuleIds, ...pasikaJsonRuleIds];
4877
- var pasikaConfig = {
5051
+ function ruleIds(rules2) {
5052
+ return Object.keys(rules2).map((name) => `pasika/${name}`);
5053
+ }
5054
+ var pasikaRuleIds = ruleIds(pasikaRules);
5055
+ var documentationRuleIds = ruleIds(documentationRules);
5056
+ var tailwindRuleIds = ruleIds(tailwindRules);
5057
+ var repoPackageJsonRuleIds = ruleIds(repoPackageJsonRules);
5058
+ var nextPackageJsonRuleIds = ruleIds(nextPackageJsonRules);
5059
+ var huskyRuleIds = ruleIds(huskyRules);
5060
+ var allPasikaRuleIds = [
5061
+ ...pasikaRuleIds,
5062
+ ...documentationRuleIds,
5063
+ ...tailwindRuleIds,
5064
+ ...repoPackageJsonRuleIds,
5065
+ ...nextPackageJsonRuleIds,
5066
+ ...huskyRuleIds
5067
+ ];
5068
+ var nextAppBlock = {
4878
5069
  files: ["src/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}"],
4879
5070
  plugins: {
4880
5071
  pasika: { rules: pasikaRules }
4881
5072
  },
4882
5073
  rules: Object.fromEntries(pasikaRuleIds.map((id) => [id, "error"]))
4883
5074
  };
5075
+ var tailwindGlobalsBlock = {
5076
+ files: ["src/**/globals.css"],
5077
+ plugins: {
5078
+ css,
5079
+ pasika: { rules: tailwindRules }
5080
+ },
5081
+ language: "css/css",
5082
+ languageOptions: { tolerant: true },
5083
+ rules: Object.fromEntries(
5084
+ tailwindRuleIds.filter((id) => id !== "pasika/global-css-location").map((id) => [id, "error"])
5085
+ )
5086
+ };
5087
+ var tailwindAnyCssBlock = {
5088
+ files: ["src/**/*.css"],
5089
+ plugins: {
5090
+ css,
5091
+ pasika: { rules: tailwindRules }
5092
+ },
5093
+ language: "css/css",
5094
+ languageOptions: { tolerant: true },
5095
+ rules: { "pasika/global-css-location": "error" }
5096
+ };
5097
+ var manifestBlock = {
5098
+ files: ["package.json"],
5099
+ plugins: {
5100
+ json: { languages: { json: jsonPlugin.languages.json } },
5101
+ pasika: { rules: { ...repoPackageJsonRules, ...nextPackageJsonRules, ...huskyRules } }
5102
+ },
5103
+ language: "json/json",
5104
+ rules: Object.fromEntries(
5105
+ [...repoPackageJsonRuleIds, ...nextPackageJsonRuleIds, ...huskyRuleIds].map((id) => [id, "error"])
5106
+ )
5107
+ };
5108
+ var docsBlock = {
5109
+ files: ["docs/**/*.md"],
5110
+ ignores: ["**/_*/**"],
5111
+ plugins: {
5112
+ markdown,
5113
+ pasika: { rules: documentationRules }
5114
+ },
5115
+ language: "markdown/gfm",
5116
+ rules: Object.fromEntries(documentationRuleIds.map((id) => [id, "error"]))
5117
+ };
5118
+ var pasikaRepo = [manifestBlock, docsBlock];
5119
+ var pasikaNext = [...pasikaRepo, nextAppBlock, tailwindGlobalsBlock, tailwindAnyCssBlock];
4884
5120
  export {
4885
5121
  allPasikaRuleIds,
4886
- cssRules,
4887
- jsonRules,
4888
- mdRules,
4889
- pasikaConfig,
4890
- pasikaCssRuleIds,
4891
- pasikaJsonRuleIds,
4892
- pasikaMdRuleIds,
4893
- pasikaRuleIds,
4894
- pasikaRules
5122
+ documentationRules,
5123
+ huskyRules,
5124
+ nextPackageJsonRules,
5125
+ pasikaNext,
5126
+ pasikaRepo,
5127
+ pasikaRules,
5128
+ repoPackageJsonRules,
5129
+ tailwindRules
4895
5130
  };