pasika 0.10.19 → 0.10.20

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;
@@ -6378,6 +6378,19 @@ var rootVariablesRule = {
6378
6378
  };
6379
6379
 
6380
6380
  // eslint/rules/tailwind/apply-usage.ts
6381
+ function reportRawDeclarations(context, rule) {
6382
+ for (const child of blockChildren2(rule)) {
6383
+ if (child.type === "Declaration") {
6384
+ if (child.property.startsWith("--")) continue;
6385
+ context.report({
6386
+ node: child,
6387
+ message: `Style declaration "${child.property}" inside a global selector must use @apply.`
6388
+ });
6389
+ continue;
6390
+ }
6391
+ if (child.type === "Rule") reportRawDeclarations(context, child);
6392
+ }
6393
+ }
6381
6394
  var applyUsageRule = {
6382
6395
  meta: {
6383
6396
  schema: [],
@@ -6389,17 +6402,11 @@ var applyUsageRule = {
6389
6402
  create(context) {
6390
6403
  return {
6391
6404
  "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
- }
6405
+ for (const child of node.children) {
6406
+ if (child.type === "Rule") reportRawDeclarations(context, child);
6407
+ if (child.type !== "Atrule" || child.name !== "layer") continue;
6408
+ for (const layered of blockChildren2(child)) {
6409
+ if (layered.type === "Rule") reportRawDeclarations(context, layered);
6403
6410
  }
6404
6411
  }
6405
6412
  }
@@ -6981,6 +6988,38 @@ var singleUseUtilityRule = {
6981
6988
  }
6982
6989
  };
6983
6990
 
6991
+ // eslint/rules/tailwind/global-selector-styling.ts
6992
+ function hasStyling(node) {
6993
+ for (const child of blockChildren2(node)) {
6994
+ if (child.type === "Declaration" && !child.property.startsWith("--")) return true;
6995
+ if (child.type === "Atrule" && child.name === "apply") return true;
6996
+ if (child.type === "Rule" && hasStyling(child)) return true;
6997
+ }
6998
+ return false;
6999
+ }
7000
+ var globalSelectorStylingRule = {
7001
+ meta: {
7002
+ schema: [],
7003
+ type: "problem",
7004
+ docs: {
7005
+ description: "Forbid element/component styling in global selectors outside @layer base."
7006
+ }
7007
+ },
7008
+ create(context) {
7009
+ return {
7010
+ "StyleSheet:exit"(node) {
7011
+ for (const child of node.children) {
7012
+ if (child.type !== "Rule" || !hasStyling(child)) continue;
7013
+ context.report({
7014
+ node: child,
7015
+ message: "Global selectors outside @layer base may only override CSS variables; keep element/component styling as Tailwind classes in the consumer."
7016
+ });
7017
+ }
7018
+ }
7019
+ };
7020
+ }
7021
+ };
7022
+
6984
7023
  // eslint/rules/tailwind/index.ts
6985
7024
  var tailwindRules = {
6986
7025
  "theme-reset": themeResetRule,
@@ -6995,7 +7034,8 @@ var tailwindRules = {
6995
7034
  "css-entry-point": cssEntryPointRule,
6996
7035
  "global-stylesheet": globalStylesheetRule,
6997
7036
  "unused-utility": unusedUtilityRule,
6998
- "single-use-utility": singleUseUtilityRule
7037
+ "single-use-utility": singleUseUtilityRule,
7038
+ "global-selector-styling": globalSelectorStylingRule
6999
7039
  };
7000
7040
 
7001
7041
  // 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.20",
4
4
  "description": "Reusable agent setup package",
5
5
  "repository": {
6
6
  "type": "git",