@plumeria/eslint-plugin 10.4.2 → 10.4.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.
@@ -489,15 +489,29 @@ exports.validateValues = {
489
489
  !property.key ||
490
490
  !property.value ||
491
491
  property.key.type !== 'Identifier' ||
492
- typeof property.key.name !== 'string' ||
493
- property.value.type !== 'Literal') {
492
+ typeof property.key.name !== 'string') {
494
493
  return;
495
494
  }
496
495
  const key = property.key.name;
497
- const rawValue = property.value.value;
498
496
  if (!validData_1.validData[key]) {
499
497
  return;
500
498
  }
499
+ if (property.value.type === 'ObjectExpression') {
500
+ context.report({
501
+ node: property.value,
502
+ messageId: 'invalidPrimitive',
503
+ data: {
504
+ key,
505
+ type: 'object',
506
+ value: 'object',
507
+ },
508
+ });
509
+ return;
510
+ }
511
+ if (property.value.type !== 'Literal') {
512
+ return;
513
+ }
514
+ const rawValue = property.value.value;
501
515
  if (typeof rawValue === 'boolean' || rawValue === null) {
502
516
  context.report({
503
517
  node: property.value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/eslint-plugin",
3
- "version": "10.4.2",
3
+ "version": "10.4.3",
4
4
  "description": "Plumeria ESLint plugin",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",