pasika 0.10.42 → 0.10.44
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/dist/eslint/pasika/index.d.ts +1 -0
- package/dist/eslint/pasika/index.js +184 -95
- package/package.json +1 -1
|
@@ -201,6 +201,7 @@ declare const pasikaPlugin: {
|
|
|
201
201
|
"import-through-index": eslint.Rule.RuleModule;
|
|
202
202
|
"util-file-name": eslint.Rule.RuleModule;
|
|
203
203
|
"no-util-barrel": eslint.Rule.RuleModule;
|
|
204
|
+
"no-redundant-alias": eslint.Rule.RuleModule;
|
|
204
205
|
"enforce-barrel-exports": eslint.Rule.RuleModule;
|
|
205
206
|
"config-extraction": eslint.Rule.RuleModule;
|
|
206
207
|
"value-extraction": eslint.Rule.RuleModule;
|
|
@@ -4708,8 +4708,81 @@ var noMixedConcernsRule = {
|
|
|
4708
4708
|
}
|
|
4709
4709
|
};
|
|
4710
4710
|
|
|
4711
|
-
// eslint/rules/no-
|
|
4711
|
+
// eslint/rules/no-redundant-alias.ts
|
|
4712
4712
|
import path37 from "path";
|
|
4713
|
+
var DOC3 = "See docs/next-codebase-guide/rules/redundant-aliases-rule.md";
|
|
4714
|
+
var VALUE_SENTINELS = /* @__PURE__ */ new Set(["undefined", "NaN", "Infinity"]);
|
|
4715
|
+
var HTTP_METHODS = /* @__PURE__ */ new Set(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]);
|
|
4716
|
+
function entityNameText(name) {
|
|
4717
|
+
if (!name) return void 0;
|
|
4718
|
+
if (name.type === "Identifier") return name.name;
|
|
4719
|
+
if (name.type === "TSQualifiedName") {
|
|
4720
|
+
const left = entityNameText(name.left);
|
|
4721
|
+
const right = name.right?.name;
|
|
4722
|
+
return left && right ? `${left}.${right}` : void 0;
|
|
4723
|
+
}
|
|
4724
|
+
if (name.type === "MemberExpression" && !name.computed) {
|
|
4725
|
+
const object = entityNameText(name.object);
|
|
4726
|
+
const property = name.property?.name;
|
|
4727
|
+
return object && property ? `${object}.${property}` : void 0;
|
|
4728
|
+
}
|
|
4729
|
+
return void 0;
|
|
4730
|
+
}
|
|
4731
|
+
function aliasMessage(alias, source) {
|
|
4732
|
+
const aliasName = alias ?? "This declaration";
|
|
4733
|
+
const sourceName = source ?? "the original symbol";
|
|
4734
|
+
return `"${aliasName}" only renames "${sourceName}". Use "${sourceName}" directly or rename the original symbol and its consumers. ${DOC3}`;
|
|
4735
|
+
}
|
|
4736
|
+
var noRedundantAliasRule = {
|
|
4737
|
+
meta: {
|
|
4738
|
+
schema: [],
|
|
4739
|
+
type: "problem",
|
|
4740
|
+
docs: {
|
|
4741
|
+
description: "Disallow declarations that only give an existing symbol a second name."
|
|
4742
|
+
}
|
|
4743
|
+
},
|
|
4744
|
+
create(context) {
|
|
4745
|
+
return {
|
|
4746
|
+
VariableDeclarator(node) {
|
|
4747
|
+
if (node.id.type !== "Identifier" || node.init?.type !== "Identifier") return;
|
|
4748
|
+
const declaration = node.parent;
|
|
4749
|
+
if (declaration.type !== "VariableDeclaration" || declaration.kind !== "const") return;
|
|
4750
|
+
const exported = declaration.parent.type === "ExportNamedDeclaration";
|
|
4751
|
+
const frameworkRouteAlias = path37.basename(context.filename) === "route.ts" && exported && HTTP_METHODS.has(node.id.name);
|
|
4752
|
+
if (frameworkRouteAlias || VALUE_SENTINELS.has(node.init.name)) return;
|
|
4753
|
+
context.report({
|
|
4754
|
+
node,
|
|
4755
|
+
message: aliasMessage(node.id.name, node.init.name)
|
|
4756
|
+
});
|
|
4757
|
+
},
|
|
4758
|
+
TSTypeAliasDeclaration(node) {
|
|
4759
|
+
if (node.typeParameters) return;
|
|
4760
|
+
const annotation = node.typeAnnotation;
|
|
4761
|
+
if (annotation?.type !== "TSTypeReference" || annotation.typeArguments) return;
|
|
4762
|
+
const source = entityNameText(annotation.typeName);
|
|
4763
|
+
if (!source) return;
|
|
4764
|
+
context.report({
|
|
4765
|
+
node,
|
|
4766
|
+
message: aliasMessage(node.id?.name, source)
|
|
4767
|
+
});
|
|
4768
|
+
},
|
|
4769
|
+
TSInterfaceDeclaration(node) {
|
|
4770
|
+
if (node.typeParameters || node.body?.body?.length !== 0 || node.extends?.length !== 1) return;
|
|
4771
|
+
const heritage = node.extends[0];
|
|
4772
|
+
if (heritage?.typeArguments) return;
|
|
4773
|
+
const source = entityNameText(heritage?.expression);
|
|
4774
|
+
if (!source) return;
|
|
4775
|
+
context.report({
|
|
4776
|
+
node,
|
|
4777
|
+
message: aliasMessage(node.id?.name, source)
|
|
4778
|
+
});
|
|
4779
|
+
}
|
|
4780
|
+
};
|
|
4781
|
+
}
|
|
4782
|
+
};
|
|
4783
|
+
|
|
4784
|
+
// eslint/rules/no-util-barrel.ts
|
|
4785
|
+
import path38 from "path";
|
|
4713
4786
|
var noUtilBarrelRule = {
|
|
4714
4787
|
meta: {
|
|
4715
4788
|
schema: [],
|
|
@@ -4719,7 +4792,7 @@ var noUtilBarrelRule = {
|
|
|
4719
4792
|
}
|
|
4720
4793
|
},
|
|
4721
4794
|
create(context) {
|
|
4722
|
-
const filename =
|
|
4795
|
+
const filename = path38.resolve(context.filename);
|
|
4723
4796
|
const sourceRoot = sourceRootOf3(context, filename);
|
|
4724
4797
|
return {
|
|
4725
4798
|
Program(node) {
|
|
@@ -4728,7 +4801,7 @@ var noUtilBarrelRule = {
|
|
|
4728
4801
|
if (!target) continue;
|
|
4729
4802
|
const segments = target.replace(/\\/g, "/").split("/");
|
|
4730
4803
|
const utilsIndex = segments.lastIndexOf("utils");
|
|
4731
|
-
if (utilsIndex < 0 || !
|
|
4804
|
+
if (utilsIndex < 0 || !path38.basename(target).startsWith("index.")) continue;
|
|
4732
4805
|
context.report({
|
|
4733
4806
|
node,
|
|
4734
4807
|
message: `Import utilities directly instead of through "${specifier}". See docs/next-codebase-guide/rules/utilities-rule.md`
|
|
@@ -4748,10 +4821,10 @@ function importSpecifiers2(source) {
|
|
|
4748
4821
|
return specifiers;
|
|
4749
4822
|
}
|
|
4750
4823
|
function sourceRootOf3(context, filename) {
|
|
4751
|
-
const marker = `${
|
|
4824
|
+
const marker = `${path38.sep}src${path38.sep}`;
|
|
4752
4825
|
const srcIndex = filename.lastIndexOf(marker);
|
|
4753
4826
|
if (srcIndex >= 0) return filename.slice(0, srcIndex + marker.length - 1);
|
|
4754
|
-
return
|
|
4827
|
+
return path38.resolve(context.cwd ?? process.cwd(), "src");
|
|
4755
4828
|
}
|
|
4756
4829
|
|
|
4757
4830
|
// eslint/rules/package-json/exact-version.ts
|
|
@@ -4970,7 +5043,7 @@ var nextjsStackRule = {
|
|
|
4970
5043
|
|
|
4971
5044
|
// eslint/rules/package-json/vitest-coverage.ts
|
|
4972
5045
|
import { existsSync as existsSync5, readFileSync as readFileSync8 } from "fs";
|
|
4973
|
-
import
|
|
5046
|
+
import path39 from "path";
|
|
4974
5047
|
function memberName5(member) {
|
|
4975
5048
|
return member.name.type === "String" ? member.name.value : member.name.name;
|
|
4976
5049
|
}
|
|
@@ -5039,7 +5112,7 @@ var vitestCoverageRule = {
|
|
|
5039
5112
|
message: 'package.json must declare a "test:unit:coverage" script that runs Vitest with coverage.'
|
|
5040
5113
|
});
|
|
5041
5114
|
}
|
|
5042
|
-
const configName = VITEST_CONFIG_NAMES2.find((name) => existsSync5(
|
|
5115
|
+
const configName = VITEST_CONFIG_NAMES2.find((name) => existsSync5(path39.join(context.cwd, name)));
|
|
5043
5116
|
if (!configName) {
|
|
5044
5117
|
context.report({
|
|
5045
5118
|
node,
|
|
@@ -5047,7 +5120,7 @@ var vitestCoverageRule = {
|
|
|
5047
5120
|
});
|
|
5048
5121
|
return;
|
|
5049
5122
|
}
|
|
5050
|
-
const content = readFileSync8(
|
|
5123
|
+
const content = readFileSync8(path39.join(context.cwd, configName), "utf8");
|
|
5051
5124
|
for (const metric of THRESHOLD_METRICS) {
|
|
5052
5125
|
if (!new RegExp(`\\b${metric}\\s*:\\s*[1-9]\\d*`).test(content)) {
|
|
5053
5126
|
context.report({ node, message: `${configName} must set a coverage threshold above zero for ${metric}.` });
|
|
@@ -5093,7 +5166,7 @@ var nextjsPackageJsonRules = {
|
|
|
5093
5166
|
};
|
|
5094
5167
|
|
|
5095
5168
|
// eslint/rules/prefer-enum.ts
|
|
5096
|
-
import
|
|
5169
|
+
import path40 from "path";
|
|
5097
5170
|
function isConstAssertion(node) {
|
|
5098
5171
|
const typeAnnotation = node.typeAnnotation;
|
|
5099
5172
|
return typeAnnotation?.type === "TSTypeReference" && typeAnnotation.typeName?.type === "Identifier" && typeAnnotation.typeName.name === "const";
|
|
@@ -5103,18 +5176,26 @@ function isEnumConvertibleProperty(property) {
|
|
|
5103
5176
|
const { value } = property;
|
|
5104
5177
|
return value.type === "Literal" && (typeof value.value === "string" || typeof value.value === "number");
|
|
5105
5178
|
}
|
|
5179
|
+
function isEnumLiteralType(node) {
|
|
5180
|
+
if (node.type !== "TSLiteralType") return false;
|
|
5181
|
+
const value = node.literal?.value;
|
|
5182
|
+
return typeof value === "string" || typeof value === "number";
|
|
5183
|
+
}
|
|
5184
|
+
function isEnumLiteralUnion(node) {
|
|
5185
|
+
return node?.type === "TSUnionType" && (node.types?.length ?? 0) >= 2 && (node.types ?? []).every(isEnumLiteralType);
|
|
5186
|
+
}
|
|
5106
5187
|
var preferEnumRule = {
|
|
5107
5188
|
meta: {
|
|
5108
5189
|
schema: [],
|
|
5109
5190
|
type: "problem",
|
|
5110
5191
|
docs: {
|
|
5111
|
-
description: "Require
|
|
5192
|
+
description: "Require fixed sets of named string/number values to be TypeScript enums instead of `as const` objects or literal-union type aliases."
|
|
5112
5193
|
}
|
|
5113
5194
|
},
|
|
5114
5195
|
create(context) {
|
|
5115
|
-
const filename =
|
|
5196
|
+
const filename = path40.resolve(context.filename);
|
|
5116
5197
|
const sourceRoot = sourceRootOf(context);
|
|
5117
|
-
if (!filename.startsWith(sourceRoot +
|
|
5198
|
+
if (!filename.startsWith(sourceRoot + path40.sep)) return {};
|
|
5118
5199
|
return {
|
|
5119
5200
|
TSAsExpression(node) {
|
|
5120
5201
|
if (!isConstAssertion(node)) return;
|
|
@@ -5126,13 +5207,20 @@ var preferEnumRule = {
|
|
|
5126
5207
|
node,
|
|
5127
5208
|
message: "A fixed set of named values must be a TypeScript enum, not an object literal marked as const. See docs/next-codebase-guide/rules/constants-rule.md"
|
|
5128
5209
|
});
|
|
5210
|
+
},
|
|
5211
|
+
TSTypeAliasDeclaration(node) {
|
|
5212
|
+
if (node.typeParameters || !isEnumLiteralUnion(node.typeAnnotation)) return;
|
|
5213
|
+
context.report({
|
|
5214
|
+
node,
|
|
5215
|
+
message: "A named union made only of string or number literals must be a TypeScript enum. See docs/next-codebase-guide/rules/constants-rule.md"
|
|
5216
|
+
});
|
|
5129
5217
|
}
|
|
5130
5218
|
};
|
|
5131
5219
|
}
|
|
5132
5220
|
};
|
|
5133
5221
|
|
|
5134
5222
|
// eslint/rules/pure-function-extract.ts
|
|
5135
|
-
import
|
|
5223
|
+
import path41 from "path";
|
|
5136
5224
|
var ROUTE_HANDLER_EXPORT_NAMES = /* @__PURE__ */ new Set([
|
|
5137
5225
|
"GET",
|
|
5138
5226
|
"POST",
|
|
@@ -5176,12 +5264,12 @@ var pureFunctionExtractRule = {
|
|
|
5176
5264
|
},
|
|
5177
5265
|
create(context) {
|
|
5178
5266
|
const filename = context.filename;
|
|
5179
|
-
const isRouteFile =
|
|
5267
|
+
const isRouteFile = path41.basename(filename) === "route.ts";
|
|
5180
5268
|
const isComponentFile = filename.endsWith(".tsx") || filename.endsWith(".jsx");
|
|
5181
5269
|
const sourceRoot = sourceRootOf(context);
|
|
5182
|
-
const relative =
|
|
5270
|
+
const relative = path41.relative(sourceRoot, filename);
|
|
5183
5271
|
if (relative.startsWith("..")) return {};
|
|
5184
|
-
const segments = relative.split(
|
|
5272
|
+
const segments = relative.split(path41.sep);
|
|
5185
5273
|
const folders = segments.slice(0, -1);
|
|
5186
5274
|
const isHookSupportFile = folders.includes("hooks") && /\.(?:[cm]?[jt]s)$/.test(filename);
|
|
5187
5275
|
if (!isComponentFile && !isRouteFile && !isHookSupportFile) return {};
|
|
@@ -5370,7 +5458,7 @@ var repeatedStructureRule = {
|
|
|
5370
5458
|
};
|
|
5371
5459
|
|
|
5372
5460
|
// eslint/rules/root-support-placement.ts
|
|
5373
|
-
import
|
|
5461
|
+
import path42 from "path";
|
|
5374
5462
|
function isSupportFolder(value) {
|
|
5375
5463
|
return value === "utils" || value === "types" || value === "schemas" || value === "constants";
|
|
5376
5464
|
}
|
|
@@ -5403,7 +5491,7 @@ var rootSupportPlacementRule = {
|
|
|
5403
5491
|
},
|
|
5404
5492
|
create(context) {
|
|
5405
5493
|
const sourceRoot = sourceRootOf(context);
|
|
5406
|
-
const file =
|
|
5494
|
+
const file = path42.resolve(context.filename);
|
|
5407
5495
|
const segments = segmentsOf(file, sourceRoot);
|
|
5408
5496
|
const folderSegments = folderSegmentsOf(file, sourceRoot);
|
|
5409
5497
|
const supportFolder = folderSegments[folderSegments.length - 1];
|
|
@@ -5443,9 +5531,9 @@ var rootSupportPlacementRule = {
|
|
|
5443
5531
|
};
|
|
5444
5532
|
|
|
5445
5533
|
// eslint/rules/route-handler-shape.ts
|
|
5446
|
-
import
|
|
5534
|
+
import path43 from "path";
|
|
5447
5535
|
import ts7 from "typescript";
|
|
5448
|
-
var
|
|
5536
|
+
var HTTP_METHODS2 = /* @__PURE__ */ new Set(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]);
|
|
5449
5537
|
var REQUIRED_BOUNDARY = "withResponse";
|
|
5450
5538
|
function isFunctionLike(node) {
|
|
5451
5539
|
return node.type === "ArrowFunctionExpression" || node.type === "FunctionExpression";
|
|
@@ -5528,7 +5616,7 @@ var routeHandlerShapeRule = {
|
|
|
5528
5616
|
}
|
|
5529
5617
|
},
|
|
5530
5618
|
create(context) {
|
|
5531
|
-
if (
|
|
5619
|
+
if (path43.basename(context.filename) !== "route.ts") return {};
|
|
5532
5620
|
const sourceText = context.sourceCode.text;
|
|
5533
5621
|
function reportUnwrapped(node, name) {
|
|
5534
5622
|
context.report({
|
|
@@ -5572,14 +5660,14 @@ var routeHandlerShapeRule = {
|
|
|
5572
5660
|
FunctionDeclaration(node) {
|
|
5573
5661
|
const exported = node.parent?.type === "ExportNamedDeclaration";
|
|
5574
5662
|
const name = node.id?.name;
|
|
5575
|
-
if (!exported || !name || !
|
|
5663
|
+
if (!exported || !name || !HTTP_METHODS2.has(name) || !node.body) return;
|
|
5576
5664
|
reportUnwrapped(node, name);
|
|
5577
5665
|
},
|
|
5578
5666
|
VariableDeclarator(node) {
|
|
5579
5667
|
if (node.id.type !== "Identifier") return;
|
|
5580
5668
|
const name = node.id.name;
|
|
5581
5669
|
const exported = node.parent.parent?.type === "ExportNamedDeclaration";
|
|
5582
|
-
if (!exported || !
|
|
5670
|
+
if (!exported || !HTTP_METHODS2.has(name) || !node.init) return;
|
|
5583
5671
|
checkExport(node, name, node.init);
|
|
5584
5672
|
}
|
|
5585
5673
|
};
|
|
@@ -5587,7 +5675,7 @@ var routeHandlerShapeRule = {
|
|
|
5587
5675
|
};
|
|
5588
5676
|
|
|
5589
5677
|
// eslint/rules/schema-casing.ts
|
|
5590
|
-
import
|
|
5678
|
+
import path44 from "path";
|
|
5591
5679
|
function isCamelCase(name) {
|
|
5592
5680
|
return /^[a-z][a-zA-Z0-9]*$/.test(name);
|
|
5593
5681
|
}
|
|
@@ -5615,9 +5703,9 @@ var schemaCasingRule = {
|
|
|
5615
5703
|
}
|
|
5616
5704
|
},
|
|
5617
5705
|
create(context) {
|
|
5618
|
-
const filename =
|
|
5706
|
+
const filename = path44.resolve(context.filename);
|
|
5619
5707
|
const sourceRoot = sourceRootOf(context);
|
|
5620
|
-
if (!filename.startsWith(sourceRoot +
|
|
5708
|
+
if (!filename.startsWith(sourceRoot + path44.sep)) return {};
|
|
5621
5709
|
let zodLocalName;
|
|
5622
5710
|
return {
|
|
5623
5711
|
ImportDeclaration(node) {
|
|
@@ -5649,7 +5737,7 @@ var schemaCasingRule = {
|
|
|
5649
5737
|
};
|
|
5650
5738
|
|
|
5651
5739
|
// eslint/rules/sole-state-owner.ts
|
|
5652
|
-
import
|
|
5740
|
+
import path45 from "path";
|
|
5653
5741
|
import ts8 from "typescript";
|
|
5654
5742
|
function findStateHooks(node) {
|
|
5655
5743
|
const hooks = [];
|
|
@@ -5729,7 +5817,7 @@ var soleStateOwnerRule = {
|
|
|
5729
5817
|
}
|
|
5730
5818
|
},
|
|
5731
5819
|
create(context) {
|
|
5732
|
-
const filename =
|
|
5820
|
+
const filename = path45.resolve(context.filename);
|
|
5733
5821
|
if (!filename.endsWith(".tsx") && !filename.endsWith(".jsx")) return {};
|
|
5734
5822
|
const text = context.sourceCode.text;
|
|
5735
5823
|
const components = parseComponentInfo(text, filename);
|
|
@@ -5808,7 +5896,7 @@ function usesOutsideJsx(declaration, hook, children) {
|
|
|
5808
5896
|
}
|
|
5809
5897
|
|
|
5810
5898
|
// eslint/rules/source-under-src.ts
|
|
5811
|
-
import
|
|
5899
|
+
import path46 from "path";
|
|
5812
5900
|
var NON_SOURCE_ROOT_DIRS = /* @__PURE__ */ new Set([
|
|
5813
5901
|
".agents",
|
|
5814
5902
|
".cache",
|
|
@@ -5849,14 +5937,14 @@ var sourceUnderSrcRule = {
|
|
|
5849
5937
|
}
|
|
5850
5938
|
},
|
|
5851
5939
|
create(context) {
|
|
5852
|
-
const filename =
|
|
5940
|
+
const filename = path46.resolve(context.filename);
|
|
5853
5941
|
if (!MODULE_EXTENSION.test(filename)) return {};
|
|
5854
|
-
const relative =
|
|
5942
|
+
const relative = path46.relative(context.cwd, filename).replace(/\\/g, "/");
|
|
5855
5943
|
if (relative === "src" || relative.startsWith("src/")) return {};
|
|
5856
5944
|
const topLevel = relative.split("/")[0] ?? "";
|
|
5857
5945
|
if (NON_SOURCE_ROOT_DIRS.has(topLevel)) return {};
|
|
5858
5946
|
if (!relative.includes("/")) {
|
|
5859
|
-
const basename =
|
|
5947
|
+
const basename = path46.basename(filename);
|
|
5860
5948
|
if (CONFIG_FILE.test(basename) || DECLARATION_FILE.test(basename) || basename.startsWith(".")) return {};
|
|
5861
5949
|
}
|
|
5862
5950
|
return {
|
|
@@ -5872,7 +5960,7 @@ var sourceUnderSrcRule = {
|
|
|
5872
5960
|
};
|
|
5873
5961
|
|
|
5874
5962
|
// eslint/rules/stay-flat.ts
|
|
5875
|
-
import
|
|
5963
|
+
import path47 from "path";
|
|
5876
5964
|
var stayFlatRule = {
|
|
5877
5965
|
meta: {
|
|
5878
5966
|
schema: [],
|
|
@@ -5883,7 +5971,7 @@ var stayFlatRule = {
|
|
|
5883
5971
|
},
|
|
5884
5972
|
create(context) {
|
|
5885
5973
|
const sourceRoot = sourceRootOf(context);
|
|
5886
|
-
const file =
|
|
5974
|
+
const file = path47.resolve(context.filename);
|
|
5887
5975
|
const segments = segmentsOf(file, sourceRoot);
|
|
5888
5976
|
if (segments.length !== 3 || segments[0] !== "features") return {};
|
|
5889
5977
|
const index = getProjectIndex(sourceRoot);
|
|
@@ -5923,7 +6011,7 @@ var stayFlatRule = {
|
|
|
5923
6011
|
};
|
|
5924
6012
|
|
|
5925
6013
|
// eslint/rules/support-file-placement.ts
|
|
5926
|
-
import
|
|
6014
|
+
import path48 from "path";
|
|
5927
6015
|
var CONFIG_OWNED_FOLDERS = /* @__PURE__ */ new Set(["types", "constants"]);
|
|
5928
6016
|
var EXPORT_KIND_BY_SUPPORT_FOLDER = /* @__PURE__ */ new Map([
|
|
5929
6017
|
["constants", "constant"],
|
|
@@ -5948,7 +6036,7 @@ var supportFilePlacementRule = {
|
|
|
5948
6036
|
},
|
|
5949
6037
|
create(context) {
|
|
5950
6038
|
const sourceRoot = sourceRootOf(context);
|
|
5951
|
-
const supportFile =
|
|
6039
|
+
const supportFile = path48.resolve(context.filename);
|
|
5952
6040
|
const currentFolder = folderSegmentsOf(supportFile, sourceRoot);
|
|
5953
6041
|
const supportFolder = currentFolder[currentFolder.length - 1];
|
|
5954
6042
|
if (supportFolder === void 0 || !SUPPORT_FOLDERS.has(supportFolder)) return {};
|
|
@@ -6002,7 +6090,7 @@ var supportFilePlacementRule = {
|
|
|
6002
6090
|
|
|
6003
6091
|
// eslint/rules/support-folder-shape.ts
|
|
6004
6092
|
import fs5 from "fs";
|
|
6005
|
-
import
|
|
6093
|
+
import path49 from "path";
|
|
6006
6094
|
var SUPPORT_FOLDERS3 = /* @__PURE__ */ new Set(["constants", "types", "schemas"]);
|
|
6007
6095
|
var INDEX_NAMES = /* @__PURE__ */ new Set(["index.ts", "index.tsx", "index.mts", "index.cts"]);
|
|
6008
6096
|
var supportFolderShapeRule = {
|
|
@@ -6014,12 +6102,12 @@ var supportFolderShapeRule = {
|
|
|
6014
6102
|
}
|
|
6015
6103
|
},
|
|
6016
6104
|
create(context) {
|
|
6017
|
-
const filename =
|
|
6018
|
-
const baseName =
|
|
6105
|
+
const filename = path49.resolve(context.filename);
|
|
6106
|
+
const baseName = path49.basename(filename);
|
|
6019
6107
|
if (!INDEX_NAMES.has(baseName)) return {};
|
|
6020
|
-
const folder =
|
|
6108
|
+
const folder = path49.basename(path49.dirname(filename));
|
|
6021
6109
|
if (!SUPPORT_FOLDERS3.has(folder)) return {};
|
|
6022
|
-
const directory =
|
|
6110
|
+
const directory = path49.dirname(filename);
|
|
6023
6111
|
let entries;
|
|
6024
6112
|
try {
|
|
6025
6113
|
entries = fs5.readdirSync(directory);
|
|
@@ -6036,7 +6124,7 @@ var supportFolderShapeRule = {
|
|
|
6036
6124
|
const exportPattern = /export\s+(?:\{[^}]*\}|\*[^;]*)\s+from\s+["'](?<specifier>\.[^"']+)["']/g;
|
|
6037
6125
|
for (const match of source.matchAll(exportPattern)) {
|
|
6038
6126
|
const specifier = match.groups?.specifier;
|
|
6039
|
-
if (specifier) exportedFiles.add(
|
|
6127
|
+
if (specifier) exportedFiles.add(path49.basename(specifier));
|
|
6040
6128
|
}
|
|
6041
6129
|
const hasAnyReExport = exportedFiles.size > 0;
|
|
6042
6130
|
const guide = `docs/next-codebase-guide/rules/${folder === "constants" ? "constants" : "types-and-schemas"}-rule.md`;
|
|
@@ -6208,11 +6296,11 @@ var baseLayerPairRule = {
|
|
|
6208
6296
|
|
|
6209
6297
|
// eslint/rules/tailwind/css-entry-point.ts
|
|
6210
6298
|
import { statSync as statSync4 } from "fs";
|
|
6211
|
-
import
|
|
6299
|
+
import path52 from "path";
|
|
6212
6300
|
|
|
6213
6301
|
// eslint/rules/tailwind/source-files.ts
|
|
6214
6302
|
import { readdirSync as readdirSync3, readFileSync as readFileSync9, statSync as statSync3 } from "fs";
|
|
6215
|
-
import
|
|
6303
|
+
import path50 from "path";
|
|
6216
6304
|
var CSS_EXTENSIONS = [".css"];
|
|
6217
6305
|
var MODULE_EXTENSIONS3 = [".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"];
|
|
6218
6306
|
var SOURCE_EXTENSIONS = [...MODULE_EXTENSIONS3, ...CSS_EXTENSIONS];
|
|
@@ -6225,7 +6313,7 @@ function findFiles(dir, extensions) {
|
|
|
6225
6313
|
}
|
|
6226
6314
|
return entries.flatMap((entry) => {
|
|
6227
6315
|
if (entry.startsWith(".") || entry === "node_modules") return [];
|
|
6228
|
-
const entryPath =
|
|
6316
|
+
const entryPath = path50.join(dir, entry);
|
|
6229
6317
|
let stats;
|
|
6230
6318
|
try {
|
|
6231
6319
|
stats = statSync3(entryPath);
|
|
@@ -6233,7 +6321,7 @@ function findFiles(dir, extensions) {
|
|
|
6233
6321
|
return [];
|
|
6234
6322
|
}
|
|
6235
6323
|
if (stats.isDirectory()) return findFiles(entryPath, extensions);
|
|
6236
|
-
return extensions.includes(
|
|
6324
|
+
return extensions.includes(path50.extname(entry)) ? [entryPath] : [];
|
|
6237
6325
|
});
|
|
6238
6326
|
}
|
|
6239
6327
|
function cachedTextReader() {
|
|
@@ -6256,7 +6344,7 @@ function escapeRegExp(text) {
|
|
|
6256
6344
|
}
|
|
6257
6345
|
|
|
6258
6346
|
// eslint/rules/tailwind/stylesheet-graph.ts
|
|
6259
|
-
import
|
|
6347
|
+
import path51 from "path";
|
|
6260
6348
|
function registersTailwind(text) {
|
|
6261
6349
|
return /@import\s+(?:url\(\s*)?["']tailwindcss["']\s*\)?/i.test(text);
|
|
6262
6350
|
}
|
|
@@ -6270,25 +6358,25 @@ function moduleImports(text, fileName) {
|
|
|
6270
6358
|
return new RegExp(`(?:import|require)\\s*\\(?\\s*["'][^"']*${escaped}["']`, "i").test(text);
|
|
6271
6359
|
}
|
|
6272
6360
|
function resolveSpecifier2(fromFile, spec, sourceRoot) {
|
|
6273
|
-
if (spec.startsWith("/")) return
|
|
6274
|
-
if (spec.startsWith("./") || spec.startsWith("../")) return
|
|
6275
|
-
if (spec.startsWith("@/")) return
|
|
6361
|
+
if (spec.startsWith("/")) return path51.resolve(spec);
|
|
6362
|
+
if (spec.startsWith("./") || spec.startsWith("../")) return path51.resolve(path51.dirname(fromFile), spec);
|
|
6363
|
+
if (spec.startsWith("@/")) return path51.resolve(sourceRoot, spec.slice(2));
|
|
6276
6364
|
return void 0;
|
|
6277
6365
|
}
|
|
6278
6366
|
function buildStylesheetGraph(options) {
|
|
6279
6367
|
const { cssFiles, sourceRoot, textOf } = options;
|
|
6280
|
-
const cssSet = new Set(cssFiles.map((file) =>
|
|
6368
|
+
const cssSet = new Set(cssFiles.map((file) => path51.normalize(file)));
|
|
6281
6369
|
const globals = cssFiles.filter((file) => registersTailwind(textOf(file)));
|
|
6282
6370
|
const reachable = /* @__PURE__ */ new Set();
|
|
6283
6371
|
const queue = [...globals];
|
|
6284
|
-
for (const global of globals) reachable.add(
|
|
6372
|
+
for (const global of globals) reachable.add(path51.normalize(global));
|
|
6285
6373
|
while (queue.length > 0) {
|
|
6286
6374
|
const from = queue.shift();
|
|
6287
6375
|
if (!from) continue;
|
|
6288
6376
|
for (const spec of importedSpecifiers(textOf(from))) {
|
|
6289
6377
|
const target = resolveSpecifier2(from, spec, sourceRoot);
|
|
6290
6378
|
if (!target) continue;
|
|
6291
|
-
const normalized =
|
|
6379
|
+
const normalized = path51.normalize(target);
|
|
6292
6380
|
if (cssSet.has(normalized) && !reachable.has(normalized)) {
|
|
6293
6381
|
reachable.add(normalized);
|
|
6294
6382
|
queue.push(normalized);
|
|
@@ -6300,7 +6388,7 @@ function buildStylesheetGraph(options) {
|
|
|
6300
6388
|
for (const spec of importedSpecifiers(textOf(global))) {
|
|
6301
6389
|
const target = resolveSpecifier2(global, spec, sourceRoot);
|
|
6302
6390
|
if (!target) continue;
|
|
6303
|
-
const normalized =
|
|
6391
|
+
const normalized = path51.normalize(target);
|
|
6304
6392
|
if (cssSet.has(normalized)) directChildren.add(normalized);
|
|
6305
6393
|
}
|
|
6306
6394
|
}
|
|
@@ -6308,8 +6396,8 @@ function buildStylesheetGraph(options) {
|
|
|
6308
6396
|
}
|
|
6309
6397
|
|
|
6310
6398
|
// eslint/rules/tailwind/css-entry-point.ts
|
|
6311
|
-
var APP_STYLES_DIR =
|
|
6312
|
-
var GLOBAL_STYLESHEET_PATH =
|
|
6399
|
+
var APP_STYLES_DIR = path52.join("app", "styles");
|
|
6400
|
+
var GLOBAL_STYLESHEET_PATH = path52.join(APP_STYLES_DIR, "globals.css");
|
|
6313
6401
|
var cssEntryPointRule = {
|
|
6314
6402
|
meta: {
|
|
6315
6403
|
schema: [],
|
|
@@ -6335,8 +6423,8 @@ var cssEntryPointRule = {
|
|
|
6335
6423
|
return {
|
|
6336
6424
|
"StyleSheet:exit"(node) {
|
|
6337
6425
|
if (globals.length === 0) return;
|
|
6338
|
-
const current =
|
|
6339
|
-
const relative =
|
|
6426
|
+
const current = path52.normalize(path52.resolve(context.filename));
|
|
6427
|
+
const relative = path52.relative(sourceRoot, current);
|
|
6340
6428
|
if (globals.includes(current)) {
|
|
6341
6429
|
if (globals.length > 1) {
|
|
6342
6430
|
context.report({
|
|
@@ -6352,7 +6440,7 @@ var cssEntryPointRule = {
|
|
|
6352
6440
|
});
|
|
6353
6441
|
return;
|
|
6354
6442
|
}
|
|
6355
|
-
const basename =
|
|
6443
|
+
const basename = path52.basename(current);
|
|
6356
6444
|
const importCount = moduleFiles.filter((modulePath) => moduleImports(textOf(modulePath), basename)).length;
|
|
6357
6445
|
if (importCount !== 1) {
|
|
6358
6446
|
context.report({
|
|
@@ -6362,7 +6450,7 @@ var cssEntryPointRule = {
|
|
|
6362
6450
|
}
|
|
6363
6451
|
return;
|
|
6364
6452
|
}
|
|
6365
|
-
const isInAppStyles = relative === APP_STYLES_DIR || relative.startsWith(`${APP_STYLES_DIR}${
|
|
6453
|
+
const isInAppStyles = relative === APP_STYLES_DIR || relative.startsWith(`${APP_STYLES_DIR}${path52.sep}`);
|
|
6366
6454
|
if (!isInAppStyles) {
|
|
6367
6455
|
context.report({
|
|
6368
6456
|
node,
|
|
@@ -6851,7 +6939,7 @@ var tailwindRules = {
|
|
|
6851
6939
|
};
|
|
6852
6940
|
|
|
6853
6941
|
// eslint/rules/type-extraction.ts
|
|
6854
|
-
import
|
|
6942
|
+
import path53 from "path";
|
|
6855
6943
|
var typeExtractionRule = {
|
|
6856
6944
|
meta: {
|
|
6857
6945
|
schema: [],
|
|
@@ -6862,7 +6950,7 @@ var typeExtractionRule = {
|
|
|
6862
6950
|
},
|
|
6863
6951
|
create(context) {
|
|
6864
6952
|
const sourceRoot = sourceRootOf(context);
|
|
6865
|
-
const file =
|
|
6953
|
+
const file = path53.resolve(context.filename);
|
|
6866
6954
|
const segments = segmentsOf(file, sourceRoot);
|
|
6867
6955
|
if (segments.length === 0) return {};
|
|
6868
6956
|
const index = getProjectIndex(sourceRoot);
|
|
@@ -6997,7 +7085,7 @@ var uiStateRule = {
|
|
|
6997
7085
|
// eslint/rules/unknown-utility.ts
|
|
6998
7086
|
import { existsSync as existsSync6, readdirSync as readdirSync4, readFileSync as readFileSync10, statSync as statSync6 } from "fs";
|
|
6999
7087
|
import { createRequire } from "module";
|
|
7000
|
-
import
|
|
7088
|
+
import path54 from "path";
|
|
7001
7089
|
var PREFIX_NAMESPACES = {
|
|
7002
7090
|
bg: ["color"],
|
|
7003
7091
|
text: ["color", "text"],
|
|
@@ -7237,7 +7325,7 @@ function stylesheetFiles(dir) {
|
|
|
7237
7325
|
}
|
|
7238
7326
|
return entries.flatMap((entry) => {
|
|
7239
7327
|
if (entry.startsWith(".") || entry === "node_modules") return [];
|
|
7240
|
-
const entryPath =
|
|
7328
|
+
const entryPath = path54.join(dir, entry);
|
|
7241
7329
|
let stats;
|
|
7242
7330
|
try {
|
|
7243
7331
|
stats = statSync6(entryPath);
|
|
@@ -7245,7 +7333,7 @@ function stylesheetFiles(dir) {
|
|
|
7245
7333
|
return [];
|
|
7246
7334
|
}
|
|
7247
7335
|
if (stats.isDirectory()) return stylesheetFiles(entryPath);
|
|
7248
|
-
return
|
|
7336
|
+
return path54.extname(entry) === ".css" ? [entryPath] : [];
|
|
7249
7337
|
});
|
|
7250
7338
|
}
|
|
7251
7339
|
function packageNameOf(specifier) {
|
|
@@ -7256,10 +7344,10 @@ function packageNameOf(specifier) {
|
|
|
7256
7344
|
function resolvePackageStylesheet(fromFile, specifier) {
|
|
7257
7345
|
const packageName = packageNameOf(specifier);
|
|
7258
7346
|
if (!packageName || packageName === "tailwindcss") return void 0;
|
|
7259
|
-
let directory =
|
|
7260
|
-
while (directory !==
|
|
7261
|
-
const packageRoot =
|
|
7262
|
-
const manifestPath =
|
|
7347
|
+
let directory = path54.dirname(fromFile);
|
|
7348
|
+
while (directory !== path54.dirname(directory)) {
|
|
7349
|
+
const packageRoot = path54.join(directory, "node_modules", packageName);
|
|
7350
|
+
const manifestPath = path54.join(packageRoot, "package.json");
|
|
7263
7351
|
if (existsSync6(manifestPath)) {
|
|
7264
7352
|
try {
|
|
7265
7353
|
const manifest = readFileSync10(manifestPath, "utf8");
|
|
@@ -7267,13 +7355,13 @@ function resolvePackageStylesheet(fromFile, specifier) {
|
|
|
7267
7355
|
const main = /"main"\s*:\s*"(?<file>[^"]+\.css)"/.exec(manifest)?.groups?.file;
|
|
7268
7356
|
const target = stylesheet ?? main;
|
|
7269
7357
|
if (!target) return void 0;
|
|
7270
|
-
const resolved =
|
|
7358
|
+
const resolved = path54.resolve(packageRoot, target);
|
|
7271
7359
|
return existsSync6(resolved) ? resolved : void 0;
|
|
7272
7360
|
} catch {
|
|
7273
7361
|
return void 0;
|
|
7274
7362
|
}
|
|
7275
7363
|
}
|
|
7276
|
-
directory =
|
|
7364
|
+
directory = path54.dirname(directory);
|
|
7277
7365
|
}
|
|
7278
7366
|
return void 0;
|
|
7279
7367
|
}
|
|
@@ -7524,7 +7612,7 @@ var unknownUtilityRule = {
|
|
|
7524
7612
|
};
|
|
7525
7613
|
|
|
7526
7614
|
// eslint/rules/util-file-name.ts
|
|
7527
|
-
import
|
|
7615
|
+
import path55 from "path";
|
|
7528
7616
|
function toKebabCase2(value) {
|
|
7529
7617
|
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();
|
|
7530
7618
|
}
|
|
@@ -7537,7 +7625,7 @@ var utilFileNameRule = {
|
|
|
7537
7625
|
}
|
|
7538
7626
|
},
|
|
7539
7627
|
create(context) {
|
|
7540
|
-
const filename =
|
|
7628
|
+
const filename = path55.resolve(context.filename);
|
|
7541
7629
|
const segments = filename.replace(/\\/g, "/").split("/");
|
|
7542
7630
|
if (!segments.includes("utils")) return {};
|
|
7543
7631
|
let module;
|
|
@@ -7551,13 +7639,13 @@ var utilFileNameRule = {
|
|
|
7551
7639
|
const functionName = functions[0]?.name;
|
|
7552
7640
|
if (!functionName) return {};
|
|
7553
7641
|
const expected = toKebabCase2(functionName);
|
|
7554
|
-
const actual =
|
|
7642
|
+
const actual = path55.basename(filename, path55.extname(filename));
|
|
7555
7643
|
if (!expected || actual === expected) return {};
|
|
7556
7644
|
return {
|
|
7557
7645
|
Program(node) {
|
|
7558
7646
|
context.report({
|
|
7559
7647
|
node,
|
|
7560
|
-
message: `A utility file exporting ${functionName} must be named ${expected}.${
|
|
7648
|
+
message: `A utility file exporting ${functionName} must be named ${expected}.${path55.extname(filename).slice(1)}.`
|
|
7561
7649
|
});
|
|
7562
7650
|
}
|
|
7563
7651
|
};
|
|
@@ -7565,7 +7653,7 @@ var utilFileNameRule = {
|
|
|
7565
7653
|
};
|
|
7566
7654
|
|
|
7567
7655
|
// eslint/rules/value-extraction.ts
|
|
7568
|
-
import
|
|
7656
|
+
import path56 from "path";
|
|
7569
7657
|
var valueExtractionRule = {
|
|
7570
7658
|
meta: {
|
|
7571
7659
|
schema: [],
|
|
@@ -7576,7 +7664,7 @@ var valueExtractionRule = {
|
|
|
7576
7664
|
},
|
|
7577
7665
|
create(context) {
|
|
7578
7666
|
const sourceRoot = sourceRootOf(context);
|
|
7579
|
-
const file =
|
|
7667
|
+
const file = path56.resolve(context.filename);
|
|
7580
7668
|
const segments = segmentsOf(file, sourceRoot);
|
|
7581
7669
|
if (segments.length === 0 || segments[0] !== "app") return {};
|
|
7582
7670
|
const index = getProjectIndex(sourceRoot);
|
|
@@ -7598,7 +7686,7 @@ var valueExtractionRule = {
|
|
|
7598
7686
|
|
|
7599
7687
|
// eslint/rules/vulyk/tracked-docs.ts
|
|
7600
7688
|
import { existsSync as existsSync7, readFileSync as readFileSync11 } from "fs";
|
|
7601
|
-
import
|
|
7689
|
+
import path57 from "path";
|
|
7602
7690
|
var PASIKA_REPO = "Bredansky/pasika";
|
|
7603
7691
|
var BASE_REQUIRED_TRACKED_DOCS = [
|
|
7604
7692
|
{ name: "documentation-guide", path: "docs/documentation-guide" },
|
|
@@ -7631,8 +7719,8 @@ var trackedDocsRule = {
|
|
|
7631
7719
|
if (!context.filename.endsWith("package.json")) return;
|
|
7632
7720
|
const root = node.body;
|
|
7633
7721
|
if (root.type !== "Object") return;
|
|
7634
|
-
const projectRoot =
|
|
7635
|
-
const configPath =
|
|
7722
|
+
const projectRoot = path57.dirname(path57.resolve(context.filename));
|
|
7723
|
+
const configPath = path57.join(projectRoot, "vulyk.config.ts");
|
|
7636
7724
|
if (!existsSync7(configPath)) {
|
|
7637
7725
|
context.report({
|
|
7638
7726
|
node,
|
|
@@ -7657,7 +7745,7 @@ var trackedDocsRule = {
|
|
|
7657
7745
|
});
|
|
7658
7746
|
}
|
|
7659
7747
|
}
|
|
7660
|
-
const agentsPath =
|
|
7748
|
+
const agentsPath = path57.join(projectRoot, "AGENTS.md");
|
|
7661
7749
|
if (!existsSync7(agentsPath)) {
|
|
7662
7750
|
context.report({
|
|
7663
7751
|
node,
|
|
@@ -7718,9 +7806,9 @@ var vulykRules = {
|
|
|
7718
7806
|
// eslint/rules/with-response-helper.ts
|
|
7719
7807
|
var HELPER2 = "withResponse";
|
|
7720
7808
|
var ENTRY2 = "pasika/with-response";
|
|
7721
|
-
var
|
|
7722
|
-
var DECLARED2 = `A repository must not declare its own ${HELPER2}; import it from ${ENTRY2}. See ${
|
|
7723
|
-
var IMPORTED2 = `${HELPER2} must be imported from ${ENTRY2}. See ${
|
|
7809
|
+
var DOC4 = "docs/pasika-adoption-guide/rules/with-response-helper-rule.md";
|
|
7810
|
+
var DECLARED2 = `A repository must not declare its own ${HELPER2}; import it from ${ENTRY2}. See ${DOC4}`;
|
|
7811
|
+
var IMPORTED2 = `${HELPER2} must be imported from ${ENTRY2}. See ${DOC4}`;
|
|
7724
7812
|
function isNamed2(node, name) {
|
|
7725
7813
|
return node?.type === "Identifier" && node.name === name;
|
|
7726
7814
|
}
|
|
@@ -7757,7 +7845,7 @@ var withResponseHelperRule = {
|
|
|
7757
7845
|
|
|
7758
7846
|
// eslint/rules/zirka-baseline.ts
|
|
7759
7847
|
import fs6 from "fs";
|
|
7760
|
-
import
|
|
7848
|
+
import path58 from "path";
|
|
7761
7849
|
var ESLINT_CONFIG = /^eslint\.config\.(?:ts|mts|cts|js|mjs|cjs)$/;
|
|
7762
7850
|
var PRETTIER_CONFIGS = [
|
|
7763
7851
|
"prettier.config.mjs",
|
|
@@ -7776,10 +7864,10 @@ var zirkaBaselineRule = {
|
|
|
7776
7864
|
}
|
|
7777
7865
|
},
|
|
7778
7866
|
create(context) {
|
|
7779
|
-
const filename =
|
|
7780
|
-
const basename =
|
|
7867
|
+
const filename = path58.resolve(context.filename);
|
|
7868
|
+
const basename = path58.basename(filename);
|
|
7781
7869
|
if (!ESLINT_CONFIG.test(basename)) return {};
|
|
7782
|
-
const projectRoot =
|
|
7870
|
+
const projectRoot = path58.dirname(filename);
|
|
7783
7871
|
const report3 = (message) => {
|
|
7784
7872
|
context.report({
|
|
7785
7873
|
node: context.sourceCode.ast,
|
|
@@ -7794,7 +7882,7 @@ var zirkaBaselineRule = {
|
|
|
7794
7882
|
'ESLint config must take its configuration from zirka (import { styleguide } from "zirka") instead of restating rules locally.'
|
|
7795
7883
|
);
|
|
7796
7884
|
}
|
|
7797
|
-
const tsconfigPath =
|
|
7885
|
+
const tsconfigPath = path58.join(projectRoot, "tsconfig.json");
|
|
7798
7886
|
if (!fs6.existsSync(tsconfigPath)) {
|
|
7799
7887
|
report3('No tsconfig.json found. Create one extending the zirka TypeScript base config ("zirka/typescript").');
|
|
7800
7888
|
} else {
|
|
@@ -7812,13 +7900,13 @@ var zirkaBaselineRule = {
|
|
|
7812
7900
|
report3('tsconfig.json must extend the zirka TypeScript base config ("zirka/typescript").');
|
|
7813
7901
|
}
|
|
7814
7902
|
}
|
|
7815
|
-
const prettierConfigFile = PRETTIER_CONFIGS.find((name) => fs6.existsSync(
|
|
7903
|
+
const prettierConfigFile = PRETTIER_CONFIGS.find((name) => fs6.existsSync(path58.join(projectRoot, name)));
|
|
7816
7904
|
if (!prettierConfigFile) {
|
|
7817
7905
|
report3(
|
|
7818
7906
|
"No prettier config found. Create one that takes its configuration from zirka (styleguide({ prettier: true }).prettierConfig)."
|
|
7819
7907
|
);
|
|
7820
7908
|
} else {
|
|
7821
|
-
const content = fs6.readFileSync(
|
|
7909
|
+
const content = fs6.readFileSync(path58.join(projectRoot, prettierConfigFile), "utf8");
|
|
7822
7910
|
if (!content.includes("zirka")) {
|
|
7823
7911
|
report3(
|
|
7824
7912
|
"The prettier config must take its configuration from zirka (styleguide({ prettier: true }).prettierConfig) instead of restating it locally."
|
|
@@ -7841,10 +7929,10 @@ function referencesZirka(sourceCode) {
|
|
|
7841
7929
|
// eslint/rules/zod-fetch-helper.ts
|
|
7842
7930
|
var HELPER3 = "zodFetch";
|
|
7843
7931
|
var ENTRY3 = "pasika/zod-fetch";
|
|
7844
|
-
var
|
|
7845
|
-
var FETCHED = `fetch must not be called; make the request through ${HELPER3} from ${ENTRY3}. See ${
|
|
7846
|
-
var DECLARED3 = `A file must not declare its own ${HELPER3}; import it from ${ENTRY3}. See ${
|
|
7847
|
-
var IMPORTED3 = `${HELPER3} must be imported from ${ENTRY3}. See ${
|
|
7932
|
+
var DOC5 = "docs/pasika-adoption-guide/rules/zod-fetch-helper-rule.md";
|
|
7933
|
+
var FETCHED = `fetch must not be called; make the request through ${HELPER3} from ${ENTRY3}. See ${DOC5}`;
|
|
7934
|
+
var DECLARED3 = `A file must not declare its own ${HELPER3}; import it from ${ENTRY3}. See ${DOC5}`;
|
|
7935
|
+
var IMPORTED3 = `${HELPER3} must be imported from ${ENTRY3}. See ${DOC5}`;
|
|
7848
7936
|
var GLOBAL_OBJECTS = /* @__PURE__ */ new Set(["globalThis", "window", "self", "global"]);
|
|
7849
7937
|
var TEST_FILE = /(?:^|[\\/])(?:__tests__|tests)[\\/]|[.](?:test|spec)[.][cm]?[jt]sx?$/;
|
|
7850
7938
|
function isNamed3(node, name) {
|
|
@@ -8022,6 +8110,7 @@ var pasikaNextjsAppRules = {
|
|
|
8022
8110
|
"import-through-index": importThroughIndexRule,
|
|
8023
8111
|
"util-file-name": utilFileNameRule,
|
|
8024
8112
|
"no-util-barrel": noUtilBarrelRule,
|
|
8113
|
+
"no-redundant-alias": noRedundantAliasRule,
|
|
8025
8114
|
"enforce-barrel-exports": enforceBarrelExportsRule,
|
|
8026
8115
|
"config-extraction": configExtractionRule,
|
|
8027
8116
|
"value-extraction": valueExtractionRule,
|