pasika 0.5.1 → 0.5.3

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.
@@ -4916,6 +4916,12 @@ function selectorNames(node) {
4916
4916
  }
4917
4917
 
4918
4918
  // eslint/rules/tailwind/theme-reset.ts
4919
+ function isThemeReset(node) {
4920
+ if (!node) return false;
4921
+ if (node.type === "Declaration") return node.property.startsWith("--*");
4922
+ if (node.type === "Raw") return node.value.includes("--*: initial");
4923
+ return false;
4924
+ }
4919
4925
  var themeResetRule = {
4920
4926
  meta: {
4921
4927
  schema: [],
@@ -4927,13 +4933,16 @@ var themeResetRule = {
4927
4933
  create(context) {
4928
4934
  return {
4929
4935
  "StyleSheet:exit"(node) {
4930
- const resetFound = atrulesNamed(node, "theme").some(
4931
- (theme) => blockChildren2(theme).some((child) => {
4932
- if (child.type === "Declaration") return child.property.startsWith("--*");
4933
- if (child.type === "Raw") return child.value.includes("--*: initial");
4934
- return false;
4935
- })
4936
- );
4936
+ const resetFound = atrulesNamed(node, "theme").some((theme) => {
4937
+ const direct = blockChildren2(theme).some(isThemeReset);
4938
+ if (direct) return true;
4939
+ let nested = false;
4940
+ walkNodes(theme, (current) => {
4941
+ if (nested) return;
4942
+ if (isThemeReset(current)) nested = true;
4943
+ });
4944
+ return nested;
4945
+ });
4937
4946
  if (!resetFound) {
4938
4947
  context.report({
4939
4948
  node,
@@ -5725,18 +5734,37 @@ var huskyRules = {
5725
5734
  import { existsSync as existsSync3, readFileSync as readFileSync9 } from "fs";
5726
5735
  import path46 from "path";
5727
5736
  var PASIKA_REPO = "Bredansky/pasika";
5737
+ var BASE_REQUIRED_DOCS = [
5738
+ { name: "documentation-guide", path: "docs/documentation-guide" },
5739
+ { name: "framework-adoption-guide", path: "docs/framework-adoption-guide" },
5740
+ { name: "repository-policy", path: "docs/repository-policy.md" }
5741
+ ];
5742
+ var NEXTJS_REQUIRED_DOCS = [
5743
+ { name: "code-organization-guide", path: "docs/code-organization-guide" },
5744
+ { name: "styling-guide", path: "docs/styling-guide" }
5745
+ ];
5746
+ function memberName5(member) {
5747
+ return member.name.type === "String" ? member.name.value : member.name.name;
5748
+ }
5749
+ function hasDependency(root, name) {
5750
+ const section = root.members.find((member) => memberName5(member) === "dependencies");
5751
+ if (section?.value.type !== "Object") return false;
5752
+ return section.value.members.some((member) => memberName5(member) === name);
5753
+ }
5728
5754
  var vulykDocsRule = {
5729
5755
  meta: {
5730
5756
  schema: [],
5731
5757
  type: "problem",
5732
5758
  docs: {
5733
- description: "Require vulyk.config.ts to track the framework's docs from pasika and the generated AGENTS.md."
5759
+ description: "Require vulyk.config.ts to track the framework's required docs from pasika and the generated AGENTS.md."
5734
5760
  }
5735
5761
  },
5736
5762
  create(context) {
5737
5763
  return {
5738
5764
  Document(node) {
5739
5765
  if (!context.filename.endsWith("package.json")) return;
5766
+ const root = node.body;
5767
+ if (root.type !== "Object") return;
5740
5768
  const projectRoot = path46.dirname(path46.resolve(context.filename));
5741
5769
  const configPath = path46.join(projectRoot, "vulyk.config.ts");
5742
5770
  if (!existsSync3(configPath)) {
@@ -5752,6 +5780,16 @@ var vulykDocsRule = {
5752
5780
  node,
5753
5781
  message: "vulyk.config.ts must track the framework's docs from the pasika repository."
5754
5782
  });
5783
+ return;
5784
+ }
5785
+ const requiredDocs = hasDependency(root, "next") ? [...BASE_REQUIRED_DOCS, ...NEXTJS_REQUIRED_DOCS] : BASE_REQUIRED_DOCS;
5786
+ for (const doc of requiredDocs) {
5787
+ if (!config.includes(doc.path)) {
5788
+ context.report({
5789
+ node,
5790
+ message: `vulyk.config.ts must track the framework's ${doc.name} docs from pasika (${PASIKA_REPO}/${doc.path}).`
5791
+ });
5792
+ }
5755
5793
  }
5756
5794
  const agentsPath = path46.join(projectRoot, "AGENTS.md");
5757
5795
  if (!existsSync3(agentsPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pasika",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Reusable agent setup package",
5
5
  "repository": {
6
6
  "type": "git",