@plumeria/eslint-plugin 18.5.2 → 18.5.4

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.
@@ -130,7 +130,7 @@ exports.noCombinator = {
130
130
  const propertyName = node.callee.property.type === 'Identifier'
131
131
  ? node.callee.property.name
132
132
  : null;
133
- if (propertyName === 'create' || propertyName === 'variants') {
133
+ if (propertyName === 'create') {
134
134
  node.arguments.forEach((arg) => {
135
135
  if (arg.type === 'ObjectExpression') {
136
136
  checkForCombinatorsRecursively(arg);
@@ -148,7 +148,7 @@ exports.noCombinator = {
148
148
  }
149
149
  else if (node.callee.type === 'Identifier') {
150
150
  const alias = plumeriaAliases[node.callee.name];
151
- if (alias === 'create' || alias === 'variants') {
151
+ if (alias === 'create') {
152
152
  node.arguments.forEach((arg) => {
153
153
  if (arg.type === 'ObjectExpression') {
154
154
  checkForCombinatorsRecursively(arg);
@@ -49,7 +49,6 @@ exports.noDestructure = {
49
49
  keyName === 'createTheme' ||
50
50
  keyName === 'keyframes' ||
51
51
  keyName === 'viewTransition' ||
52
- keyName === 'variants' ||
53
52
  keyName === 'use') {
54
53
  context.report({
55
54
  node: prop,
@@ -26,7 +26,6 @@ exports.noInlineObject = {
26
26
  messages: {
27
27
  noInlineObjectInStyleProp: 'Do not pass inline objects to "{{prop}}". It only accepts compiled styles from css.create().',
28
28
  noInlineObjectInCssUse: 'Do not pass inline objects to css.use(). It only accepts compiled styles from css.create().',
29
- noInlineObjectInCssVariants: 'Do not pass inline objects to css.variants(). It only accepts compiled styles from css.create().',
30
29
  },
31
30
  schema: style_prop_1.stylePropSchema,
32
31
  },
@@ -92,27 +91,6 @@ exports.noInlineObject = {
92
91
  }
93
92
  });
94
93
  }
95
- if (isPlumeriaMemberCall(callNode, plumeriaAliases, 'variants')) {
96
- const config = callNode.arguments[0];
97
- if (config?.type !== 'ObjectExpression')
98
- return;
99
- config.properties.forEach((prop) => {
100
- if (prop.type !== 'Property')
101
- return;
102
- if (prop.value.type !== 'ObjectExpression')
103
- return;
104
- prop.value.properties.forEach((nested) => {
105
- if (nested.type !== 'Property')
106
- return;
107
- if (nested.value.type === 'ObjectExpression') {
108
- context.report({
109
- node: nested.value,
110
- messageId: 'noInlineObjectInCssVariants',
111
- });
112
- }
113
- });
114
- });
115
- }
116
94
  },
117
95
  };
118
96
  },
@@ -80,8 +80,7 @@ exports.noInnerCall = {
80
80
  propertyName === 'createStatic' ||
81
81
  propertyName === 'createTheme' ||
82
82
  propertyName === 'keyframes' ||
83
- propertyName === 'viewTransition' ||
84
- propertyName === 'variants') {
83
+ propertyName === 'viewTransition') {
85
84
  context.report({
86
85
  node,
87
86
  messageId: 'noInnerCall',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/eslint-plugin",
3
- "version": "18.5.2",
3
+ "version": "18.5.4",
4
4
  "description": "Plumeria ESLint plugin",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",