@pandacss/eslint-plugin 0.0.0-dev-20240130040821 → 0.0.0-dev-20240208002333

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.
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.33_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
30
+ // ../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.34_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.33_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.34_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
package/dist/index.js CHANGED
@@ -28,10 +28,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
 
31
- // ../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.33_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
31
+ // ../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.34_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
32
32
  var getImportMetaUrl, importMetaUrl;
33
33
  var init_cjs_shims = __esm({
34
- "../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.33_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
34
+ "../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.34_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
35
35
  "use strict";
36
36
  getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
37
37
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -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.0-dev-20240130040821";
7960
+ var version = "0.0.0-dev-20240208002333";
7961
7961
 
7962
7962
  // src/configs/all.ts
7963
7963
  init_cjs_shims();
@@ -7992,6 +7992,7 @@ var import_utils2 = require("@typescript-eslint/utils");
7992
7992
  var isIdentifier = (0, import_ast_utils.isNodeOfType)(import_utils2.AST_NODE_TYPES.Identifier);
7993
7993
  var isLiteral = (0, import_ast_utils.isNodeOfType)(import_utils2.AST_NODE_TYPES.Literal);
7994
7994
  var isTemplateLiteral = (0, import_ast_utils.isNodeOfType)(import_utils2.AST_NODE_TYPES.TemplateLiteral);
7995
+ var isObjectExpression = (0, import_ast_utils.isNodeOfType)(import_utils2.AST_NODE_TYPES.ObjectExpression);
7995
7996
  var isMemberExpression = (0, import_ast_utils.isNodeOfType)(import_utils2.AST_NODE_TYPES.MemberExpression);
7996
7997
  var isVariableDeclarator = (0, import_ast_utils.isNodeOfType)(import_utils2.AST_NODE_TYPES.VariableDeclarator);
7997
7998
  var isVariableDeclaration = (0, import_ast_utils.isNodeOfType)(import_utils2.AST_NODE_TYPES.VariableDeclaration);
@@ -8191,7 +8192,7 @@ var getInvalidTokens = (value, context) => {
8191
8192
  const tokens = extractTokens(value);
8192
8193
  if (!tokens.length)
8193
8194
  return [];
8194
- return syncAction("filterInvalidTokenz", getSyncOpts(context), tokens);
8195
+ return syncAction("filterInvalidTokens", getSyncOpts(context), tokens);
8195
8196
  };
8196
8197
  var getTokenImport = (context) => {
8197
8198
  const imports = _getImports(context);
@@ -8389,6 +8390,8 @@ var rule4 = createRule({
8389
8390
  return;
8390
8391
  if (isJSXExpressionContainer(node.value) && isTemplateLiteral(node.value.expression) && node.value.expression.expressions.length === 0)
8391
8392
  return;
8393
+ if (isObjectExpression(node.value))
8394
+ return;
8392
8395
  if (!isPandaProp(node, context))
8393
8396
  return;
8394
8397
  context.report({
@@ -8403,6 +8406,8 @@ var rule4 = createRule({
8403
8406
  return;
8404
8407
  if (isTemplateLiteral(node.value) && node.value.expressions.length === 0)
8405
8408
  return;
8409
+ if (isObjectExpression(node.value))
8410
+ return;
8406
8411
  if (!isPandaAttribute(node, context))
8407
8412
  return;
8408
8413
  context.report({
@@ -8748,7 +8753,7 @@ var rule8 = createRule({
8748
8753
  });
8749
8754
  var no_property_renaming_default = rule8;
8750
8755
 
8751
- // src/rules/no-shorthand-prop.ts
8756
+ // src/rules/prefer-longhand-properties.ts
8752
8757
  init_cjs_shims();
8753
8758
  var RULE_NAME9 = "no-shorthand-prop";
8754
8759
  var rule9 = createRule({
@@ -8812,7 +8817,7 @@ var rule9 = createRule({
8812
8817
  };
8813
8818
  }
8814
8819
  });
8815
- var no_shorthand_prop_default = rule9;
8820
+ var prefer_longhand_properties_default = rule9;
8816
8821
 
8817
8822
  // src/rules/no-unsafe-token-fn-usage.ts
8818
8823
  init_cjs_shims();
@@ -8920,9 +8925,9 @@ var no_unsafe_token_fn_usage_default = rule10;
8920
8925
  // src/rules/prefer-atomic-properties.ts
8921
8926
  init_cjs_shims();
8922
8927
 
8923
- // src/utils/shorthand-properties.ts
8928
+ // src/utils/composite-properties.ts
8924
8929
  init_cjs_shims();
8925
- var shorthandProperties = {
8930
+ var compositeProperties = {
8926
8931
  animation: [
8927
8932
  "animationName",
8928
8933
  "animationDuration",
@@ -9051,15 +9056,15 @@ var rule11 = createRule({
9051
9056
  defaultOptions: [],
9052
9057
  create(context) {
9053
9058
  const resolveCompositeProperty = (name2) => {
9054
- if (Object.hasOwn(shorthandProperties, name2))
9059
+ if (Object.hasOwn(compositeProperties, name2))
9055
9060
  return name2;
9056
9061
  const longhand = resolveShorthand(name2, context);
9057
- if (isValidProperty(longhand, context) && Object.hasOwn(shorthandProperties, longhand))
9062
+ if (isValidProperty(longhand, context) && Object.hasOwn(compositeProperties, longhand))
9058
9063
  return longhand;
9059
9064
  };
9060
9065
  const sendReport = (node, name2) => {
9061
9066
  const cpd = resolveCompositeProperty(name2);
9062
- const atomics = shorthandProperties[cpd].map((name3) => `\`${name3}\``).join(",\n");
9067
+ const atomics = compositeProperties[cpd].map((name3) => `\`${name3}\``).join(",\n");
9063
9068
  return context.report({
9064
9069
  node,
9065
9070
  messageId: "atomic",
@@ -9105,7 +9110,7 @@ var rules = {
9105
9110
  [RULE_NAME6]: no_hardcoded_color_default,
9106
9111
  [RULE_NAME7]: no_invalid_token_paths_default,
9107
9112
  [RULE_NAME8]: no_property_renaming_default,
9108
- [RULE_NAME9]: no_shorthand_prop_default,
9113
+ [RULE_NAME9]: prefer_longhand_properties_default,
9109
9114
  [RULE_NAME10]: no_unsafe_token_fn_usage_default,
9110
9115
  [RULE_NAME11]: prefer_atomic_properties_default
9111
9116
  };
package/dist/index.mjs CHANGED
@@ -3,14 +3,14 @@ import {
3
3
  __esm,
4
4
  __toESM,
5
5
  init_esm_shims
6
- } from "./chunk-6BVJTDXV.mjs";
6
+ } from "./chunk-HALLAYDZ.mjs";
7
7
 
8
8
  // package.json
9
9
  var name, version;
10
10
  var init_package = __esm({
11
11
  "package.json"() {
12
12
  name = "@pandacss/eslint-plugin";
13
- version = "0.0.0-dev-20240130040821";
13
+ version = "0.0.0-dev-20240208002333";
14
14
  }
15
15
  });
16
16
 
@@ -7950,7 +7950,7 @@ var require_dist3 = __commonJS({
7950
7950
  // src/utils/nodes.ts
7951
7951
  import { isNodeOfType } from "@typescript-eslint/utils/ast-utils";
7952
7952
  import { AST_NODE_TYPES } from "@typescript-eslint/utils";
7953
- var isIdentifier, isLiteral, isTemplateLiteral, isMemberExpression, isVariableDeclarator, isVariableDeclaration, isJSXMemberExpression, isJSXOpeningElement, isJSXExpressionContainer, isJSXAttribute, isJSXIdentifier, isCallExpression, isImportDeclaration, isImportSpecifier;
7953
+ var isIdentifier, isLiteral, isTemplateLiteral, isObjectExpression, isMemberExpression, isVariableDeclarator, isVariableDeclaration, isJSXMemberExpression, isJSXOpeningElement, isJSXExpressionContainer, isJSXAttribute, isJSXIdentifier, isCallExpression, isImportDeclaration, isImportSpecifier;
7954
7954
  var init_nodes = __esm({
7955
7955
  "src/utils/nodes.ts"() {
7956
7956
  "use strict";
@@ -7958,6 +7958,7 @@ var init_nodes = __esm({
7958
7958
  isIdentifier = isNodeOfType(AST_NODE_TYPES.Identifier);
7959
7959
  isLiteral = isNodeOfType(AST_NODE_TYPES.Literal);
7960
7960
  isTemplateLiteral = isNodeOfType(AST_NODE_TYPES.TemplateLiteral);
7961
+ isObjectExpression = isNodeOfType(AST_NODE_TYPES.ObjectExpression);
7961
7962
  isMemberExpression = isNodeOfType(AST_NODE_TYPES.MemberExpression);
7962
7963
  isVariableDeclarator = isNodeOfType(AST_NODE_TYPES.VariableDeclarator);
7963
7964
  isVariableDeclaration = isNodeOfType(AST_NODE_TYPES.VariableDeclaration);
@@ -8167,7 +8168,7 @@ var init_helpers = __esm({
8167
8168
  const tokens = extractTokens(value);
8168
8169
  if (!tokens.length)
8169
8170
  return [];
8170
- return syncAction("filterInvalidTokenz", getSyncOpts(context), tokens);
8171
+ return syncAction("filterInvalidTokens", getSyncOpts(context), tokens);
8171
8172
  };
8172
8173
  getTokenImport = (context) => {
8173
8174
  const imports = _getImports(context);
@@ -8401,6 +8402,8 @@ var init_no_dynamic_styling = __esm({
8401
8402
  return;
8402
8403
  if (isJSXExpressionContainer(node.value) && isTemplateLiteral(node.value.expression) && node.value.expression.expressions.length === 0)
8403
8404
  return;
8405
+ if (isObjectExpression(node.value))
8406
+ return;
8404
8407
  if (!isPandaProp(node, context))
8405
8408
  return;
8406
8409
  context.report({
@@ -8415,6 +8418,8 @@ var init_no_dynamic_styling = __esm({
8415
8418
  return;
8416
8419
  if (isTemplateLiteral(node.value) && node.value.expressions.length === 0)
8417
8420
  return;
8421
+ if (isObjectExpression(node.value))
8422
+ return;
8418
8423
  if (!isPandaAttribute(node, context))
8419
8424
  return;
8420
8425
  context.report({
@@ -8798,10 +8803,10 @@ var init_no_property_renaming = __esm({
8798
8803
  }
8799
8804
  });
8800
8805
 
8801
- // src/rules/no-shorthand-prop.ts
8802
- var RULE_NAME9, rule9, no_shorthand_prop_default;
8803
- var init_no_shorthand_prop = __esm({
8804
- "src/rules/no-shorthand-prop.ts"() {
8806
+ // src/rules/prefer-longhand-properties.ts
8807
+ var RULE_NAME9, rule9, prefer_longhand_properties_default;
8808
+ var init_prefer_longhand_properties = __esm({
8809
+ "src/rules/prefer-longhand-properties.ts"() {
8805
8810
  "use strict";
8806
8811
  init_esm_shims();
8807
8812
  init_helpers();
@@ -8869,7 +8874,7 @@ var init_no_shorthand_prop = __esm({
8869
8874
  };
8870
8875
  }
8871
8876
  });
8872
- no_shorthand_prop_default = rule9;
8877
+ prefer_longhand_properties_default = rule9;
8873
8878
  }
8874
8879
  });
8875
8880
 
@@ -8985,13 +8990,13 @@ var init_no_unsafe_token_fn_usage = __esm({
8985
8990
  }
8986
8991
  });
8987
8992
 
8988
- // src/utils/shorthand-properties.ts
8989
- var shorthandProperties;
8990
- var init_shorthand_properties = __esm({
8991
- "src/utils/shorthand-properties.ts"() {
8993
+ // src/utils/composite-properties.ts
8994
+ var compositeProperties;
8995
+ var init_composite_properties = __esm({
8996
+ "src/utils/composite-properties.ts"() {
8992
8997
  "use strict";
8993
8998
  init_esm_shims();
8994
- shorthandProperties = {
8999
+ compositeProperties = {
8995
9000
  animation: [
8996
9001
  "animationName",
8997
9002
  "animationDuration",
@@ -9113,7 +9118,7 @@ var init_prefer_atomic_properties = __esm({
9113
9118
  init_esm_shims();
9114
9119
  init_helpers();
9115
9120
  init_utils();
9116
- init_shorthand_properties();
9121
+ init_composite_properties();
9117
9122
  init_nodes();
9118
9123
  RULE_NAME11 = "prefer-atomic-properties";
9119
9124
  rule11 = createRule({
@@ -9131,15 +9136,15 @@ var init_prefer_atomic_properties = __esm({
9131
9136
  defaultOptions: [],
9132
9137
  create(context) {
9133
9138
  const resolveCompositeProperty = (name2) => {
9134
- if (Object.hasOwn(shorthandProperties, name2))
9139
+ if (Object.hasOwn(compositeProperties, name2))
9135
9140
  return name2;
9136
9141
  const longhand = resolveShorthand(name2, context);
9137
- if (isValidProperty(longhand, context) && Object.hasOwn(shorthandProperties, longhand))
9142
+ if (isValidProperty(longhand, context) && Object.hasOwn(compositeProperties, longhand))
9138
9143
  return longhand;
9139
9144
  };
9140
9145
  const sendReport = (node, name2) => {
9141
9146
  const cpd = resolveCompositeProperty(name2);
9142
- const atomics = shorthandProperties[cpd].map((name3) => `\`${name3}\``).join(",\n");
9147
+ const atomics = compositeProperties[cpd].map((name3) => `\`${name3}\``).join(",\n");
9143
9148
  return context.report({
9144
9149
  node,
9145
9150
  messageId: "atomic",
@@ -9191,7 +9196,7 @@ var init_rules = __esm({
9191
9196
  init_no_hardcoded_color();
9192
9197
  init_no_invalid_token_paths();
9193
9198
  init_no_property_renaming();
9194
- init_no_shorthand_prop();
9199
+ init_prefer_longhand_properties();
9195
9200
  init_no_unsafe_token_fn_usage();
9196
9201
  init_prefer_atomic_properties();
9197
9202
  rules = {
@@ -9203,7 +9208,7 @@ var init_rules = __esm({
9203
9208
  [RULE_NAME6]: no_hardcoded_color_default,
9204
9209
  [RULE_NAME7]: no_invalid_token_paths_default,
9205
9210
  [RULE_NAME8]: no_property_renaming_default,
9206
- [RULE_NAME9]: no_shorthand_prop_default,
9211
+ [RULE_NAME9]: prefer_longhand_properties_default,
9207
9212
  [RULE_NAME10]: no_unsafe_token_fn_usage_default,
9208
9213
  [RULE_NAME11]: prefer_atomic_properties_default
9209
9214
  };