pasika 0.10.19 → 0.10.21

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.
@@ -116,6 +116,7 @@ declare const tailwindRules: {
116
116
  "global-stylesheet": _eslint_css.CSSRuleDefinition;
117
117
  "unused-utility": _eslint_css.CSSRuleDefinition;
118
118
  "single-use-utility": _eslint_css.CSSRuleDefinition;
119
+ "global-selector-styling": _eslint_css.CSSRuleDefinition;
119
120
  };
120
121
 
121
122
  /** Framework-agnostic package.json rules any repository should follow. */
@@ -167,6 +168,7 @@ declare const pasikaPlugin: {
167
168
  "global-stylesheet": _eslint_css.CSSRuleDefinition;
168
169
  "unused-utility": _eslint_css.CSSRuleDefinition;
169
170
  "single-use-utility": _eslint_css.CSSRuleDefinition;
171
+ "global-selector-styling": _eslint_css.CSSRuleDefinition;
170
172
  "doc-kind-suffix": _eslint_markdown.MarkdownRuleDefinition;
171
173
  "title-matches-file-name": _eslint_markdown.MarkdownRuleDefinition;
172
174
  overview: _eslint_markdown.MarkdownRuleDefinition;
@@ -3093,7 +3093,6 @@ var pureFunctionExtractRule = {
3093
3093
  const exported = node.parent?.type === "ExportNamedDeclaration";
3094
3094
  const moduleLevel = exported || node.parent?.type === "Program";
3095
3095
  if (!moduleLevel) return;
3096
- if (!isRouteFile && !exported) return;
3097
3096
  const name = node.id?.name;
3098
3097
  if (!name) return;
3099
3098
  if (isRouteFile && ROUTE_HANDLER_EXPORT_NAMES.has(name)) return;
@@ -3109,7 +3108,6 @@ var pureFunctionExtractRule = {
3109
3108
  const exported = container?.type === "ExportNamedDeclaration";
3110
3109
  const moduleLevel = exported || container?.type === "Program";
3111
3110
  if (!moduleLevel) return;
3112
- if (!isRouteFile && !exported) return;
3113
3111
  if (isRouteFile && ROUTE_HANDLER_EXPORT_NAMES.has(name)) return;
3114
3112
  if (isComponentLikeName(name) || isHookName2(name)) return;
3115
3113
  const init = node.init;
@@ -6378,6 +6376,19 @@ var rootVariablesRule = {
6378
6376
  };
6379
6377
 
6380
6378
  // eslint/rules/tailwind/apply-usage.ts
6379
+ function reportRawDeclarations(context, rule) {
6380
+ for (const child of blockChildren2(rule)) {
6381
+ if (child.type === "Declaration") {
6382
+ if (child.property.startsWith("--")) continue;
6383
+ context.report({
6384
+ node: child,
6385
+ message: `Style declaration "${child.property}" inside a global selector must use @apply.`
6386
+ });
6387
+ continue;
6388
+ }
6389
+ if (child.type === "Rule") reportRawDeclarations(context, child);
6390
+ }
6391
+ }
6381
6392
  var applyUsageRule = {
6382
6393
  meta: {
6383
6394
  schema: [],
@@ -6389,17 +6400,11 @@ var applyUsageRule = {
6389
6400
  create(context) {
6390
6401
  return {
6391
6402
  "StyleSheet:exit"(node) {
6392
- const layers = node.children.filter((child) => child.type === "Atrule" && child.name === "layer");
6393
- for (const layer of layers) {
6394
- for (const child of blockChildren2(layer)) {
6395
- if (child.type !== "Rule") continue;
6396
- for (const declaration of blockChildren2(child)) {
6397
- if (declaration.type !== "Declaration") continue;
6398
- context.report({
6399
- node: declaration,
6400
- message: `Style declaration "${declaration.property}" inside a global selector must use @apply.`
6401
- });
6402
- }
6403
+ for (const child of node.children) {
6404
+ if (child.type === "Rule") reportRawDeclarations(context, child);
6405
+ if (child.type !== "Atrule" || child.name !== "layer") continue;
6406
+ for (const layered of blockChildren2(child)) {
6407
+ if (layered.type === "Rule") reportRawDeclarations(context, layered);
6403
6408
  }
6404
6409
  }
6405
6410
  }
@@ -6981,6 +6986,38 @@ var singleUseUtilityRule = {
6981
6986
  }
6982
6987
  };
6983
6988
 
6989
+ // eslint/rules/tailwind/global-selector-styling.ts
6990
+ function hasStyling(node) {
6991
+ for (const child of blockChildren2(node)) {
6992
+ if (child.type === "Declaration" && !child.property.startsWith("--")) return true;
6993
+ if (child.type === "Atrule" && child.name === "apply") return true;
6994
+ if (child.type === "Rule" && hasStyling(child)) return true;
6995
+ }
6996
+ return false;
6997
+ }
6998
+ var globalSelectorStylingRule = {
6999
+ meta: {
7000
+ schema: [],
7001
+ type: "problem",
7002
+ docs: {
7003
+ description: "Forbid element/component styling in global selectors outside @layer base."
7004
+ }
7005
+ },
7006
+ create(context) {
7007
+ return {
7008
+ "StyleSheet:exit"(node) {
7009
+ for (const child of node.children) {
7010
+ if (child.type !== "Rule" || !hasStyling(child)) continue;
7011
+ context.report({
7012
+ node: child,
7013
+ message: "Global selectors outside @layer base may only override CSS variables; keep element/component styling as Tailwind classes in the consumer."
7014
+ });
7015
+ }
7016
+ }
7017
+ };
7018
+ }
7019
+ };
7020
+
6984
7021
  // eslint/rules/tailwind/index.ts
6985
7022
  var tailwindRules = {
6986
7023
  "theme-reset": themeResetRule,
@@ -6995,7 +7032,8 @@ var tailwindRules = {
6995
7032
  "css-entry-point": cssEntryPointRule,
6996
7033
  "global-stylesheet": globalStylesheetRule,
6997
7034
  "unused-utility": unusedUtilityRule,
6998
- "single-use-utility": singleUseUtilityRule
7035
+ "single-use-utility": singleUseUtilityRule,
7036
+ "global-selector-styling": globalSelectorStylingRule
6999
7037
  };
7000
7038
 
7001
7039
  // eslint/rules/package-json/exact-version.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pasika",
3
- "version": "0.10.19",
3
+ "version": "0.10.21",
4
4
  "description": "Reusable agent setup package",
5
5
  "repository": {
6
6
  "type": "git",