@pandacss/eslint-plugin 0.0.12 → 0.0.13

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.
Files changed (3) hide show
  1. package/dist/index.js +107 -55
  2. package/dist/index.mjs +123 -61
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7957,7 +7957,7 @@ init_cjs_shims();
7957
7957
 
7958
7958
  // package.json
7959
7959
  var name = "@pandacss/eslint-plugin";
7960
- var version = "0.0.12";
7960
+ var version = "0.0.13";
7961
7961
 
7962
7962
  // src/configs/all.ts
7963
7963
  init_cjs_shims();
@@ -8123,6 +8123,17 @@ var isPandaProp = (node, context) => {
8123
8123
  return;
8124
8124
  return true;
8125
8125
  };
8126
+ var isStyledProperty = (node, context, calleeName) => {
8127
+ if (!isIdentifier(node.key) && !isLiteral(node.key) && !isTemplateLiteral(node.key))
8128
+ return;
8129
+ if (isIdentifier(node.key) && !isValidProperty(node.key.name, context, calleeName))
8130
+ return;
8131
+ if (isLiteral(node.key) && typeof node.key.value === "string" && !isValidProperty(node.key.value, context, calleeName))
8132
+ return;
8133
+ if (isTemplateLiteral(node.key) && !isValidProperty(node.key.quasis[0].value.raw, context, calleeName))
8134
+ return;
8135
+ return true;
8136
+ };
8126
8137
  var isInPandaFunction = (node, context) => {
8127
8138
  const callAncestor = getAncestor(isCallExpression, node);
8128
8139
  if (!callAncestor)
@@ -8138,17 +8149,9 @@ var isInPandaFunction = (node, context) => {
8138
8149
  return;
8139
8150
  if (!isPandaIsh(calleeName, context))
8140
8151
  return;
8141
- if (!isIdentifier(node.key))
8142
- return;
8143
- const attr = node.key.name;
8144
- if (!isValidProperty(attr, context, calleeName))
8145
- return;
8146
- return true;
8152
+ return calleeName;
8147
8153
  };
8148
- var isPandaAttribute = (node, context) => {
8149
- const callAncestor = getAncestor(isCallExpression, node);
8150
- if (callAncestor)
8151
- return isInPandaFunction(node, context);
8154
+ var isInJSXProp = (node, context) => {
8152
8155
  const jsxExprAncestor = getAncestor(isJSXExpressionContainer, node);
8153
8156
  const jsxAttrAncestor = getAncestor(isJSXAttribute, node);
8154
8157
  if (!jsxExprAncestor || !jsxAttrAncestor)
@@ -8159,6 +8162,16 @@ var isPandaAttribute = (node, context) => {
8159
8162
  return;
8160
8163
  return true;
8161
8164
  };
8165
+ var isPandaAttribute = (node, context) => {
8166
+ const callAncestor = getAncestor(isCallExpression, node);
8167
+ if (callAncestor) {
8168
+ const callee = isInPandaFunction(node, context);
8169
+ if (!callee)
8170
+ return;
8171
+ return isStyledProperty(node, context, callee);
8172
+ }
8173
+ return isInJSXProp(node, context);
8174
+ };
8162
8175
  var resolveLonghand = (name2, context) => {
8163
8176
  return syncAction("resolveLongHand", getSyncOpts(context), name2);
8164
8177
  };
@@ -8679,13 +8692,50 @@ var rule7 = createRule({
8679
8692
  });
8680
8693
  var no_important_default = rule7;
8681
8694
 
8682
- // src/rules/no-invalid-token-paths.ts
8695
+ // src/rules/no-invalid-nesting.ts
8683
8696
  init_cjs_shims();
8684
- var import_utils11 = require("@typescript-eslint/utils");
8685
- var import_ast_utils2 = require("@typescript-eslint/utils/ast-utils");
8686
- var RULE_NAME8 = "no-invalid-token-paths";
8697
+ var RULE_NAME8 = "no-invalid-nesting";
8687
8698
  var rule8 = createRule({
8688
8699
  name: RULE_NAME8,
8700
+ meta: {
8701
+ docs: {
8702
+ description: "Warn against invalid nesting. i.e. nested styles that don't contain the `&` character."
8703
+ },
8704
+ messages: {
8705
+ nesting: "Invalid style nesting. Nested styles must contain the `&` character."
8706
+ },
8707
+ type: "suggestion",
8708
+ schema: []
8709
+ },
8710
+ defaultOptions: [],
8711
+ create(context) {
8712
+ return {
8713
+ Property(node) {
8714
+ if (!isObjectExpression(node.value) || isIdentifier(node.key))
8715
+ return;
8716
+ if (!isInPandaFunction(node, context) && !isInJSXProp(node, context))
8717
+ return;
8718
+ const invalidLiteral = isLiteral(node.key) && typeof node.key.value === "string" && !node.key.value.includes("&");
8719
+ const invalidTemplateLiteral = isTemplateLiteral(node.key) && !node.key.quasis[0].value.raw.includes("&");
8720
+ if (invalidLiteral || invalidTemplateLiteral) {
8721
+ context.report({
8722
+ node: node.key,
8723
+ messageId: "nesting"
8724
+ });
8725
+ }
8726
+ }
8727
+ };
8728
+ }
8729
+ });
8730
+ var no_invalid_nesting_default = rule8;
8731
+
8732
+ // src/rules/no-invalid-token-paths.ts
8733
+ init_cjs_shims();
8734
+ var import_utils12 = require("@typescript-eslint/utils");
8735
+ var import_ast_utils2 = require("@typescript-eslint/utils/ast-utils");
8736
+ var RULE_NAME9 = "no-invalid-token-paths";
8737
+ var rule9 = createRule({
8738
+ name: RULE_NAME9,
8689
8739
  meta: {
8690
8740
  docs: {
8691
8741
  description: "Disallow the use of invalid token paths within token function syntax."
@@ -8738,7 +8788,7 @@ var rule8 = createRule({
8738
8788
  Property(node) {
8739
8789
  if (!isIdentifier(node.key))
8740
8790
  return;
8741
- if (!(0, import_ast_utils2.isNodeOfTypes)([import_utils11.AST_NODE_TYPES.Literal, import_utils11.AST_NODE_TYPES.TemplateLiteral])(node.value))
8791
+ if (!(0, import_ast_utils2.isNodeOfTypes)([import_utils12.AST_NODE_TYPES.Literal, import_utils12.AST_NODE_TYPES.TemplateLiteral])(node.value))
8742
8792
  return;
8743
8793
  if (!isPandaAttribute(node, context))
8744
8794
  return;
@@ -8785,13 +8835,13 @@ var rule8 = createRule({
8785
8835
  };
8786
8836
  }
8787
8837
  });
8788
- var no_invalid_token_paths_default = rule8;
8838
+ var no_invalid_token_paths_default = rule9;
8789
8839
 
8790
8840
  // src/rules/no-property-renaming.ts
8791
8841
  init_cjs_shims();
8792
- var RULE_NAME9 = "no-property-renaming";
8793
- var rule9 = createRule({
8794
- name: RULE_NAME9,
8842
+ var RULE_NAME10 = "no-property-renaming";
8843
+ var rule10 = createRule({
8844
+ name: RULE_NAME10,
8795
8845
  meta: {
8796
8846
  docs: {
8797
8847
  description: "Ensure user does not rename a property for a pattern or style prop. \nIt doesn't get tracked."
@@ -8850,15 +8900,15 @@ var rule9 = createRule({
8850
8900
  };
8851
8901
  }
8852
8902
  });
8853
- var no_property_renaming_default = rule9;
8903
+ var no_property_renaming_default = rule10;
8854
8904
 
8855
8905
  // src/rules/no-unsafe-token-fn-usage.ts
8856
8906
  init_cjs_shims();
8857
- var import_utils14 = require("@typescript-eslint/utils");
8907
+ var import_utils15 = require("@typescript-eslint/utils");
8858
8908
  var import_shared3 = require("@pandacss/shared");
8859
- var RULE_NAME10 = "no-unsafe-token-fn-usage";
8860
- var rule10 = createRule({
8861
- name: RULE_NAME10,
8909
+ var RULE_NAME11 = "no-unsafe-token-fn-usage";
8910
+ var rule11 = createRule({
8911
+ name: RULE_NAME11,
8862
8912
  meta: {
8863
8913
  docs: {
8864
8914
  description: "Prevent users from using the token function in situations where they could simply use the raw design token."
@@ -8954,13 +9004,13 @@ var rule10 = createRule({
8954
9004
  };
8955
9005
  }
8956
9006
  });
8957
- var no_unsafe_token_fn_usage_default = rule10;
9007
+ var no_unsafe_token_fn_usage_default = rule11;
8958
9008
 
8959
9009
  // src/rules/prefer-longhand-properties.ts
8960
9010
  init_cjs_shims();
8961
- var RULE_NAME11 = "prefer-longhand-properties";
8962
- var rule11 = createRule({
8963
- name: RULE_NAME11,
9011
+ var RULE_NAME12 = "prefer-longhand-properties";
9012
+ var rule12 = createRule({
9013
+ name: RULE_NAME12,
8964
9014
  meta: {
8965
9015
  docs: {
8966
9016
  description: "Discourage the use of shorthand properties and promote the preference for longhand properties in the codebase."
@@ -9020,13 +9070,13 @@ var rule11 = createRule({
9020
9070
  };
9021
9071
  }
9022
9072
  });
9023
- var prefer_longhand_properties_default = rule11;
9073
+ var prefer_longhand_properties_default = rule12;
9024
9074
 
9025
9075
  // src/rules/prefer-shorthand-properties.ts
9026
9076
  init_cjs_shims();
9027
- var RULE_NAME12 = "prefer-shorthand-properties";
9028
- var rule12 = createRule({
9029
- name: RULE_NAME12,
9077
+ var RULE_NAME13 = "prefer-shorthand-properties";
9078
+ var rule13 = createRule({
9079
+ name: RULE_NAME13,
9030
9080
  meta: {
9031
9081
  docs: {
9032
9082
  description: "Discourage the use of longhand properties and promote the preference for shorthand properties in the codebase."
@@ -9089,7 +9139,7 @@ var rule12 = createRule({
9089
9139
  };
9090
9140
  }
9091
9141
  });
9092
- var prefer_shorthand_properties_default = rule12;
9142
+ var prefer_shorthand_properties_default = rule13;
9093
9143
 
9094
9144
  // src/rules/prefer-atomic-properties.ts
9095
9145
  init_cjs_shims();
@@ -9209,9 +9259,9 @@ var compositeProperties = {
9209
9259
  };
9210
9260
 
9211
9261
  // src/rules/prefer-atomic-properties.ts
9212
- var RULE_NAME13 = "prefer-atomic-properties";
9213
- var rule13 = createRule({
9214
- name: RULE_NAME13,
9262
+ var RULE_NAME14 = "prefer-atomic-properties";
9263
+ var rule14 = createRule({
9264
+ name: RULE_NAME14,
9215
9265
  meta: {
9216
9266
  docs: {
9217
9267
  description: "Encourage the use of atomic properties instead of composite properties in the codebase."
@@ -9267,13 +9317,13 @@ var rule13 = createRule({
9267
9317
  };
9268
9318
  }
9269
9319
  });
9270
- var prefer_atomic_properties_default = rule13;
9320
+ var prefer_atomic_properties_default = rule14;
9271
9321
 
9272
9322
  // src/rules/prefer-composite-properties.ts
9273
9323
  init_cjs_shims();
9274
- var RULE_NAME14 = "prefer-composite-properties";
9275
- var rule14 = createRule({
9276
- name: RULE_NAME14,
9324
+ var RULE_NAME15 = "prefer-composite-properties";
9325
+ var rule15 = createRule({
9326
+ name: RULE_NAME15,
9277
9327
  meta: {
9278
9328
  docs: {
9279
9329
  description: "Encourage the use of composite properties instead of atomic properties in the codebase."
@@ -9327,13 +9377,13 @@ var rule14 = createRule({
9327
9377
  };
9328
9378
  }
9329
9379
  });
9330
- var prefer_composite_properties_default = rule14;
9380
+ var prefer_composite_properties_default = rule15;
9331
9381
 
9332
9382
  // src/rules/prefer-unified-property-style.ts
9333
9383
  init_cjs_shims();
9334
- var RULE_NAME15 = "prefer-unified-property-style";
9335
- var rule15 = createRule({
9336
- name: RULE_NAME15,
9384
+ var RULE_NAME16 = "prefer-unified-property-style";
9385
+ var rule16 = createRule({
9386
+ name: RULE_NAME16,
9337
9387
  meta: {
9338
9388
  docs: {
9339
9389
  description: "Discourage against mixing atomic and composite forms of the same property in a style declaration. Atomic styles give more consistent results"
@@ -9400,7 +9450,7 @@ var rule15 = createRule({
9400
9450
  };
9401
9451
  }
9402
9452
  });
9403
- var prefer_unified_property_style_default = rule15;
9453
+ var prefer_unified_property_style_default = rule16;
9404
9454
 
9405
9455
  // src/rules/index.ts
9406
9456
  var rules = {
@@ -9411,18 +9461,19 @@ var rules = {
9411
9461
  [RULE_NAME5]: no_escape_hatch_default,
9412
9462
  [RULE_NAME6]: no_hardcoded_color_default,
9413
9463
  [RULE_NAME7]: no_important_default,
9414
- [RULE_NAME8]: no_invalid_token_paths_default,
9415
- [RULE_NAME9]: no_property_renaming_default,
9416
- [RULE_NAME10]: no_unsafe_token_fn_usage_default,
9417
- [RULE_NAME11]: prefer_longhand_properties_default,
9418
- [RULE_NAME12]: prefer_shorthand_properties_default,
9419
- [RULE_NAME13]: prefer_atomic_properties_default,
9420
- [RULE_NAME14]: prefer_composite_properties_default,
9421
- [RULE_NAME15]: prefer_unified_property_style_default
9464
+ [RULE_NAME9]: no_invalid_token_paths_default,
9465
+ [RULE_NAME8]: no_invalid_nesting_default,
9466
+ [RULE_NAME10]: no_property_renaming_default,
9467
+ [RULE_NAME11]: no_unsafe_token_fn_usage_default,
9468
+ [RULE_NAME12]: prefer_longhand_properties_default,
9469
+ [RULE_NAME13]: prefer_shorthand_properties_default,
9470
+ [RULE_NAME14]: prefer_atomic_properties_default,
9471
+ [RULE_NAME15]: prefer_composite_properties_default,
9472
+ [RULE_NAME16]: prefer_unified_property_style_default
9422
9473
  };
9423
9474
 
9424
9475
  // src/configs/all.ts
9425
- var errorRules = [RULE_NAME, RULE_NAME2, RULE_NAME8];
9476
+ var errorRules = [RULE_NAME, RULE_NAME2, RULE_NAME9];
9426
9477
  var allRules = Object.fromEntries(
9427
9478
  Object.entries(rules).map(([name2]) => {
9428
9479
  return [`@pandacss/${name2}`, errorRules.includes(name2) ? "error" : "warn"];
@@ -9446,6 +9497,7 @@ var recommended_default = {
9446
9497
  "@pandacss/no-config-function-in-source": "error",
9447
9498
  "@pandacss/no-debug": "warn",
9448
9499
  "@pandacss/no-dynamic-styling": "warn",
9500
+ "@pandacss/no-invalid-nesting": "error",
9449
9501
  "@pandacss/no-invalid-token-paths": "error",
9450
9502
  "@pandacss/no-property-renaming": "warn",
9451
9503
  "@pandacss/prefer-unified-property-style": "warn"
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ var name, version;
10
10
  var init_package = __esm({
11
11
  "package.json"() {
12
12
  name = "@pandacss/eslint-plugin";
13
- version = "0.0.12";
13
+ version = "0.0.13";
14
14
  }
15
15
  });
16
16
 
@@ -7975,7 +7975,7 @@ var init_nodes = __esm({
7975
7975
  });
7976
7976
 
7977
7977
  // src/utils/helpers.ts
7978
- var import_scope_manager, getAncestor, getSyncOpts, getImportSpecifiers, _getImports, getImports, isValidStyledProp, isPandaIsh, findDeclaration, isLocalStyledFactory, isValidFile, isValidProperty, isPandaImport, isPandaProp, isInPandaFunction, isPandaAttribute, resolveLonghand, resolveShorthands, isColorAttribute, isColorToken, extractTokens, getInvalidTokens, getTokenImport;
7978
+ var import_scope_manager, getAncestor, getSyncOpts, getImportSpecifiers, _getImports, getImports, isValidStyledProp, isPandaIsh, findDeclaration, isLocalStyledFactory, isValidFile, isValidProperty, isPandaImport, isPandaProp, isStyledProperty, isInPandaFunction, isInJSXProp, isPandaAttribute, resolveLonghand, resolveShorthands, isColorAttribute, isColorToken, extractTokens, getInvalidTokens, getTokenImport;
7979
7979
  var init_helpers = __esm({
7980
7980
  "src/utils/helpers.ts"() {
7981
7981
  "use strict";
@@ -8099,6 +8099,17 @@ var init_helpers = __esm({
8099
8099
  return;
8100
8100
  return true;
8101
8101
  };
8102
+ isStyledProperty = (node, context, calleeName) => {
8103
+ if (!isIdentifier(node.key) && !isLiteral(node.key) && !isTemplateLiteral(node.key))
8104
+ return;
8105
+ if (isIdentifier(node.key) && !isValidProperty(node.key.name, context, calleeName))
8106
+ return;
8107
+ if (isLiteral(node.key) && typeof node.key.value === "string" && !isValidProperty(node.key.value, context, calleeName))
8108
+ return;
8109
+ if (isTemplateLiteral(node.key) && !isValidProperty(node.key.quasis[0].value.raw, context, calleeName))
8110
+ return;
8111
+ return true;
8112
+ };
8102
8113
  isInPandaFunction = (node, context) => {
8103
8114
  const callAncestor = getAncestor(isCallExpression, node);
8104
8115
  if (!callAncestor)
@@ -8114,17 +8125,9 @@ var init_helpers = __esm({
8114
8125
  return;
8115
8126
  if (!isPandaIsh(calleeName, context))
8116
8127
  return;
8117
- if (!isIdentifier(node.key))
8118
- return;
8119
- const attr = node.key.name;
8120
- if (!isValidProperty(attr, context, calleeName))
8121
- return;
8122
- return true;
8128
+ return calleeName;
8123
8129
  };
8124
- isPandaAttribute = (node, context) => {
8125
- const callAncestor = getAncestor(isCallExpression, node);
8126
- if (callAncestor)
8127
- return isInPandaFunction(node, context);
8130
+ isInJSXProp = (node, context) => {
8128
8131
  const jsxExprAncestor = getAncestor(isJSXExpressionContainer, node);
8129
8132
  const jsxAttrAncestor = getAncestor(isJSXAttribute, node);
8130
8133
  if (!jsxExprAncestor || !jsxAttrAncestor)
@@ -8135,6 +8138,16 @@ var init_helpers = __esm({
8135
8138
  return;
8136
8139
  return true;
8137
8140
  };
8141
+ isPandaAttribute = (node, context) => {
8142
+ const callAncestor = getAncestor(isCallExpression, node);
8143
+ if (callAncestor) {
8144
+ const callee = isInPandaFunction(node, context);
8145
+ if (!callee)
8146
+ return;
8147
+ return isStyledProperty(node, context, callee);
8148
+ }
8149
+ return isInJSXProp(node, context);
8150
+ };
8138
8151
  resolveLonghand = (name2, context) => {
8139
8152
  return syncAction("resolveLongHand", getSyncOpts(context), name2);
8140
8153
  };
@@ -8720,10 +8733,56 @@ var init_no_important = __esm({
8720
8733
  }
8721
8734
  });
8722
8735
 
8736
+ // src/rules/no-invalid-nesting.ts
8737
+ var RULE_NAME8, rule8, no_invalid_nesting_default;
8738
+ var init_no_invalid_nesting = __esm({
8739
+ "src/rules/no-invalid-nesting.ts"() {
8740
+ "use strict";
8741
+ init_esm_shims();
8742
+ init_nodes();
8743
+ init_utils();
8744
+ init_helpers();
8745
+ RULE_NAME8 = "no-invalid-nesting";
8746
+ rule8 = createRule({
8747
+ name: RULE_NAME8,
8748
+ meta: {
8749
+ docs: {
8750
+ description: "Warn against invalid nesting. i.e. nested styles that don't contain the `&` character."
8751
+ },
8752
+ messages: {
8753
+ nesting: "Invalid style nesting. Nested styles must contain the `&` character."
8754
+ },
8755
+ type: "suggestion",
8756
+ schema: []
8757
+ },
8758
+ defaultOptions: [],
8759
+ create(context) {
8760
+ return {
8761
+ Property(node) {
8762
+ if (!isObjectExpression(node.value) || isIdentifier(node.key))
8763
+ return;
8764
+ if (!isInPandaFunction(node, context) && !isInJSXProp(node, context))
8765
+ return;
8766
+ const invalidLiteral = isLiteral(node.key) && typeof node.key.value === "string" && !node.key.value.includes("&");
8767
+ const invalidTemplateLiteral = isTemplateLiteral(node.key) && !node.key.quasis[0].value.raw.includes("&");
8768
+ if (invalidLiteral || invalidTemplateLiteral) {
8769
+ context.report({
8770
+ node: node.key,
8771
+ messageId: "nesting"
8772
+ });
8773
+ }
8774
+ }
8775
+ };
8776
+ }
8777
+ });
8778
+ no_invalid_nesting_default = rule8;
8779
+ }
8780
+ });
8781
+
8723
8782
  // src/rules/no-invalid-token-paths.ts
8724
8783
  import { AST_NODE_TYPES as AST_NODE_TYPES2 } from "@typescript-eslint/utils";
8725
8784
  import { isNodeOfTypes } from "@typescript-eslint/utils/ast-utils";
8726
- var RULE_NAME8, rule8, no_invalid_token_paths_default;
8785
+ var RULE_NAME9, rule9, no_invalid_token_paths_default;
8727
8786
  var init_no_invalid_token_paths = __esm({
8728
8787
  "src/rules/no-invalid-token-paths.ts"() {
8729
8788
  "use strict";
@@ -8731,9 +8790,9 @@ var init_no_invalid_token_paths = __esm({
8731
8790
  init_helpers();
8732
8791
  init_utils();
8733
8792
  init_nodes();
8734
- RULE_NAME8 = "no-invalid-token-paths";
8735
- rule8 = createRule({
8736
- name: RULE_NAME8,
8793
+ RULE_NAME9 = "no-invalid-token-paths";
8794
+ rule9 = createRule({
8795
+ name: RULE_NAME9,
8737
8796
  meta: {
8738
8797
  docs: {
8739
8798
  description: "Disallow the use of invalid token paths within token function syntax."
@@ -8833,12 +8892,12 @@ var init_no_invalid_token_paths = __esm({
8833
8892
  };
8834
8893
  }
8835
8894
  });
8836
- no_invalid_token_paths_default = rule8;
8895
+ no_invalid_token_paths_default = rule9;
8837
8896
  }
8838
8897
  });
8839
8898
 
8840
8899
  // src/rules/no-property-renaming.ts
8841
- var RULE_NAME9, rule9, no_property_renaming_default;
8900
+ var RULE_NAME10, rule10, no_property_renaming_default;
8842
8901
  var init_no_property_renaming = __esm({
8843
8902
  "src/rules/no-property-renaming.ts"() {
8844
8903
  "use strict";
@@ -8846,9 +8905,9 @@ var init_no_property_renaming = __esm({
8846
8905
  init_utils();
8847
8906
  init_helpers();
8848
8907
  init_nodes();
8849
- RULE_NAME9 = "no-property-renaming";
8850
- rule9 = createRule({
8851
- name: RULE_NAME9,
8908
+ RULE_NAME10 = "no-property-renaming";
8909
+ rule10 = createRule({
8910
+ name: RULE_NAME10,
8852
8911
  meta: {
8853
8912
  docs: {
8854
8913
  description: "Ensure user does not rename a property for a pattern or style prop. \nIt doesn't get tracked."
@@ -8907,14 +8966,14 @@ var init_no_property_renaming = __esm({
8907
8966
  };
8908
8967
  }
8909
8968
  });
8910
- no_property_renaming_default = rule9;
8969
+ no_property_renaming_default = rule10;
8911
8970
  }
8912
8971
  });
8913
8972
 
8914
8973
  // src/rules/no-unsafe-token-fn-usage.ts
8915
8974
  import "@typescript-eslint/utils";
8916
8975
  import { getArbitraryValue as getArbitraryValue3 } from "@pandacss/shared";
8917
- var RULE_NAME10, rule10, no_unsafe_token_fn_usage_default;
8976
+ var RULE_NAME11, rule11, no_unsafe_token_fn_usage_default;
8918
8977
  var init_no_unsafe_token_fn_usage = __esm({
8919
8978
  "src/rules/no-unsafe-token-fn-usage.ts"() {
8920
8979
  "use strict";
@@ -8922,9 +8981,9 @@ var init_no_unsafe_token_fn_usage = __esm({
8922
8981
  init_helpers();
8923
8982
  init_utils();
8924
8983
  init_nodes();
8925
- RULE_NAME10 = "no-unsafe-token-fn-usage";
8926
- rule10 = createRule({
8927
- name: RULE_NAME10,
8984
+ RULE_NAME11 = "no-unsafe-token-fn-usage";
8985
+ rule11 = createRule({
8986
+ name: RULE_NAME11,
8928
8987
  meta: {
8929
8988
  docs: {
8930
8989
  description: "Prevent users from using the token function in situations where they could simply use the raw design token."
@@ -9020,12 +9079,12 @@ var init_no_unsafe_token_fn_usage = __esm({
9020
9079
  };
9021
9080
  }
9022
9081
  });
9023
- no_unsafe_token_fn_usage_default = rule10;
9082
+ no_unsafe_token_fn_usage_default = rule11;
9024
9083
  }
9025
9084
  });
9026
9085
 
9027
9086
  // src/rules/prefer-longhand-properties.ts
9028
- var RULE_NAME11, rule11, prefer_longhand_properties_default;
9087
+ var RULE_NAME12, rule12, prefer_longhand_properties_default;
9029
9088
  var init_prefer_longhand_properties = __esm({
9030
9089
  "src/rules/prefer-longhand-properties.ts"() {
9031
9090
  "use strict";
@@ -9033,9 +9092,9 @@ var init_prefer_longhand_properties = __esm({
9033
9092
  init_helpers();
9034
9093
  init_utils();
9035
9094
  init_nodes();
9036
- RULE_NAME11 = "prefer-longhand-properties";
9037
- rule11 = createRule({
9038
- name: RULE_NAME11,
9095
+ RULE_NAME12 = "prefer-longhand-properties";
9096
+ rule12 = createRule({
9097
+ name: RULE_NAME12,
9039
9098
  meta: {
9040
9099
  docs: {
9041
9100
  description: "Discourage the use of shorthand properties and promote the preference for longhand properties in the codebase."
@@ -9095,12 +9154,12 @@ var init_prefer_longhand_properties = __esm({
9095
9154
  };
9096
9155
  }
9097
9156
  });
9098
- prefer_longhand_properties_default = rule11;
9157
+ prefer_longhand_properties_default = rule12;
9099
9158
  }
9100
9159
  });
9101
9160
 
9102
9161
  // src/rules/prefer-shorthand-properties.ts
9103
- var RULE_NAME12, rule12, prefer_shorthand_properties_default;
9162
+ var RULE_NAME13, rule13, prefer_shorthand_properties_default;
9104
9163
  var init_prefer_shorthand_properties = __esm({
9105
9164
  "src/rules/prefer-shorthand-properties.ts"() {
9106
9165
  "use strict";
@@ -9108,9 +9167,9 @@ var init_prefer_shorthand_properties = __esm({
9108
9167
  init_helpers();
9109
9168
  init_utils();
9110
9169
  init_nodes();
9111
- RULE_NAME12 = "prefer-shorthand-properties";
9112
- rule12 = createRule({
9113
- name: RULE_NAME12,
9170
+ RULE_NAME13 = "prefer-shorthand-properties";
9171
+ rule13 = createRule({
9172
+ name: RULE_NAME13,
9114
9173
  meta: {
9115
9174
  docs: {
9116
9175
  description: "Discourage the use of longhand properties and promote the preference for shorthand properties in the codebase."
@@ -9173,7 +9232,7 @@ var init_prefer_shorthand_properties = __esm({
9173
9232
  };
9174
9233
  }
9175
9234
  });
9176
- prefer_shorthand_properties_default = rule12;
9235
+ prefer_shorthand_properties_default = rule13;
9177
9236
  }
9178
9237
  });
9179
9238
 
@@ -9298,7 +9357,7 @@ var init_composite_properties = __esm({
9298
9357
  });
9299
9358
 
9300
9359
  // src/rules/prefer-atomic-properties.ts
9301
- var RULE_NAME13, rule13, prefer_atomic_properties_default;
9360
+ var RULE_NAME14, rule14, prefer_atomic_properties_default;
9302
9361
  var init_prefer_atomic_properties = __esm({
9303
9362
  "src/rules/prefer-atomic-properties.ts"() {
9304
9363
  "use strict";
@@ -9307,9 +9366,9 @@ var init_prefer_atomic_properties = __esm({
9307
9366
  init_utils();
9308
9367
  init_composite_properties();
9309
9368
  init_nodes();
9310
- RULE_NAME13 = "prefer-atomic-properties";
9311
- rule13 = createRule({
9312
- name: RULE_NAME13,
9369
+ RULE_NAME14 = "prefer-atomic-properties";
9370
+ rule14 = createRule({
9371
+ name: RULE_NAME14,
9313
9372
  meta: {
9314
9373
  docs: {
9315
9374
  description: "Encourage the use of atomic properties instead of composite properties in the codebase."
@@ -9365,12 +9424,12 @@ var init_prefer_atomic_properties = __esm({
9365
9424
  };
9366
9425
  }
9367
9426
  });
9368
- prefer_atomic_properties_default = rule13;
9427
+ prefer_atomic_properties_default = rule14;
9369
9428
  }
9370
9429
  });
9371
9430
 
9372
9431
  // src/rules/prefer-composite-properties.ts
9373
- var RULE_NAME14, rule14, prefer_composite_properties_default;
9432
+ var RULE_NAME15, rule15, prefer_composite_properties_default;
9374
9433
  var init_prefer_composite_properties = __esm({
9375
9434
  "src/rules/prefer-composite-properties.ts"() {
9376
9435
  "use strict";
@@ -9379,9 +9438,9 @@ var init_prefer_composite_properties = __esm({
9379
9438
  init_utils();
9380
9439
  init_composite_properties();
9381
9440
  init_nodes();
9382
- RULE_NAME14 = "prefer-composite-properties";
9383
- rule14 = createRule({
9384
- name: RULE_NAME14,
9441
+ RULE_NAME15 = "prefer-composite-properties";
9442
+ rule15 = createRule({
9443
+ name: RULE_NAME15,
9385
9444
  meta: {
9386
9445
  docs: {
9387
9446
  description: "Encourage the use of composite properties instead of atomic properties in the codebase."
@@ -9435,12 +9494,12 @@ var init_prefer_composite_properties = __esm({
9435
9494
  };
9436
9495
  }
9437
9496
  });
9438
- prefer_composite_properties_default = rule14;
9497
+ prefer_composite_properties_default = rule15;
9439
9498
  }
9440
9499
  });
9441
9500
 
9442
9501
  // src/rules/prefer-unified-property-style.ts
9443
- var RULE_NAME15, rule15, prefer_unified_property_style_default;
9502
+ var RULE_NAME16, rule16, prefer_unified_property_style_default;
9444
9503
  var init_prefer_unified_property_style = __esm({
9445
9504
  "src/rules/prefer-unified-property-style.ts"() {
9446
9505
  "use strict";
@@ -9449,9 +9508,9 @@ var init_prefer_unified_property_style = __esm({
9449
9508
  init_utils();
9450
9509
  init_composite_properties();
9451
9510
  init_nodes();
9452
- RULE_NAME15 = "prefer-unified-property-style";
9453
- rule15 = createRule({
9454
- name: RULE_NAME15,
9511
+ RULE_NAME16 = "prefer-unified-property-style";
9512
+ rule16 = createRule({
9513
+ name: RULE_NAME16,
9455
9514
  meta: {
9456
9515
  docs: {
9457
9516
  description: "Discourage against mixing atomic and composite forms of the same property in a style declaration. Atomic styles give more consistent results"
@@ -9518,7 +9577,7 @@ var init_prefer_unified_property_style = __esm({
9518
9577
  };
9519
9578
  }
9520
9579
  });
9521
- prefer_unified_property_style_default = rule15;
9580
+ prefer_unified_property_style_default = rule16;
9522
9581
  }
9523
9582
  });
9524
9583
 
@@ -9535,6 +9594,7 @@ var init_rules = __esm({
9535
9594
  init_no_escape_hatch();
9536
9595
  init_no_hardcoded_color();
9537
9596
  init_no_important();
9597
+ init_no_invalid_nesting();
9538
9598
  init_no_invalid_token_paths();
9539
9599
  init_no_property_renaming();
9540
9600
  init_no_unsafe_token_fn_usage();
@@ -9551,14 +9611,15 @@ var init_rules = __esm({
9551
9611
  [RULE_NAME5]: no_escape_hatch_default,
9552
9612
  [RULE_NAME6]: no_hardcoded_color_default,
9553
9613
  [RULE_NAME7]: no_important_default,
9554
- [RULE_NAME8]: no_invalid_token_paths_default,
9555
- [RULE_NAME9]: no_property_renaming_default,
9556
- [RULE_NAME10]: no_unsafe_token_fn_usage_default,
9557
- [RULE_NAME11]: prefer_longhand_properties_default,
9558
- [RULE_NAME12]: prefer_shorthand_properties_default,
9559
- [RULE_NAME13]: prefer_atomic_properties_default,
9560
- [RULE_NAME14]: prefer_composite_properties_default,
9561
- [RULE_NAME15]: prefer_unified_property_style_default
9614
+ [RULE_NAME9]: no_invalid_token_paths_default,
9615
+ [RULE_NAME8]: no_invalid_nesting_default,
9616
+ [RULE_NAME10]: no_property_renaming_default,
9617
+ [RULE_NAME11]: no_unsafe_token_fn_usage_default,
9618
+ [RULE_NAME12]: prefer_longhand_properties_default,
9619
+ [RULE_NAME13]: prefer_shorthand_properties_default,
9620
+ [RULE_NAME14]: prefer_atomic_properties_default,
9621
+ [RULE_NAME15]: prefer_composite_properties_default,
9622
+ [RULE_NAME16]: prefer_unified_property_style_default
9562
9623
  };
9563
9624
  }
9564
9625
  });
@@ -9573,7 +9634,7 @@ var init_all = __esm({
9573
9634
  init_file_not_included();
9574
9635
  init_no_config_function_in_source();
9575
9636
  init_no_invalid_token_paths();
9576
- errorRules = [RULE_NAME, RULE_NAME2, RULE_NAME8];
9637
+ errorRules = [RULE_NAME, RULE_NAME2, RULE_NAME9];
9577
9638
  allRules = Object.fromEntries(
9578
9639
  Object.entries(rules).map(([name2]) => {
9579
9640
  return [`@pandacss/${name2}`, errorRules.includes(name2) ? "error" : "warn"];
@@ -9603,6 +9664,7 @@ var init_recommended = __esm({
9603
9664
  "@pandacss/no-config-function-in-source": "error",
9604
9665
  "@pandacss/no-debug": "warn",
9605
9666
  "@pandacss/no-dynamic-styling": "warn",
9667
+ "@pandacss/no-invalid-nesting": "error",
9606
9668
  "@pandacss/no-invalid-token-paths": "error",
9607
9669
  "@pandacss/no-property-renaming": "warn",
9608
9670
  "@pandacss/prefer-unified-property-style": "warn"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/eslint-plugin",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Eslint plugin for Panda CSS",
5
5
  "author": "Abraham Aremu <anubra266@gmail.com>",
6
6
  "main": "dist/index.js",