@eslint-react/jsx 1.29.1-beta.5 → 1.29.1-beta.8

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.
package/dist/index.d.mts CHANGED
@@ -44,7 +44,7 @@ declare function getAttributeValue(node: TSESTree$1.JSXAttribute | TSESTree$1.JS
44
44
  * @param node The JSX element node
45
45
  * @returns The name of the element
46
46
  */
47
- declare function getElementName(node: TSESTree.JSXElement | TSESTree.JSXFragment): string;
47
+ declare function getElementType(node: TSESTree.JSXElement | TSESTree.JSXFragment): string;
48
48
 
49
49
  declare function hasAttribute(name: string, attributes: TSESTree.JSXOpeningElement["attributes"], initialScope?: Scope): boolean;
50
50
  declare function hasAnyAttribute(names: string[], attributes: TSESTree.JSXOpeningElement["attributes"], initialScope?: Scope): boolean;
@@ -135,4 +135,4 @@ declare function isPaddingSpaces(node: TSESTree.Node): boolean;
135
135
  */
136
136
  declare function toString(node: TSESTree$1.JSXIdentifier | TSESTree$1.JSXMemberExpression | TSESTree$1.JSXNamespacedName | TSESTree$1.JSXOpeningElement | TSESTree$1.JSXClosingElement | TSESTree$1.JSXOpeningFragment | TSESTree$1.JSXClosingFragment | TSESTree$1.JSXText): string;
137
137
 
138
- export { DEFAULT_JSX_VALUE_HINT, JSXValueHint, findParentAttribute, getAttribute, getAttributeName, getAttributeValue, getElementName, hasAnyAttribute, hasAttribute, hasEveryAttribute, isBuiltInElement, isFragmentElement, isJSXValue, isKeyedElement, isLineBreak, isLiteral, isPaddingSpaces, isUserDefinedElement, isWhiteSpace, toString };
138
+ export { DEFAULT_JSX_VALUE_HINT, JSXValueHint, findParentAttribute, getAttribute, getAttributeName, getAttributeValue, getElementType, hasAnyAttribute, hasAttribute, hasEveryAttribute, isBuiltInElement, isFragmentElement, isJSXValue, isKeyedElement, isLineBreak, isLiteral, isPaddingSpaces, isUserDefinedElement, isWhiteSpace, toString };
package/dist/index.d.ts CHANGED
@@ -44,7 +44,7 @@ declare function getAttributeValue(node: TSESTree$1.JSXAttribute | TSESTree$1.JS
44
44
  * @param node The JSX element node
45
45
  * @returns The name of the element
46
46
  */
47
- declare function getElementName(node: TSESTree.JSXElement | TSESTree.JSXFragment): string;
47
+ declare function getElementType(node: TSESTree.JSXElement | TSESTree.JSXFragment): string;
48
48
 
49
49
  declare function hasAttribute(name: string, attributes: TSESTree.JSXOpeningElement["attributes"], initialScope?: Scope): boolean;
50
50
  declare function hasAnyAttribute(names: string[], attributes: TSESTree.JSXOpeningElement["attributes"], initialScope?: Scope): boolean;
@@ -135,4 +135,4 @@ declare function isPaddingSpaces(node: TSESTree.Node): boolean;
135
135
  */
136
136
  declare function toString(node: TSESTree$1.JSXIdentifier | TSESTree$1.JSXMemberExpression | TSESTree$1.JSXNamespacedName | TSESTree$1.JSXOpeningElement | TSESTree$1.JSXClosingElement | TSESTree$1.JSXOpeningFragment | TSESTree$1.JSXClosingFragment | TSESTree$1.JSXText): string;
137
137
 
138
- export { DEFAULT_JSX_VALUE_HINT, JSXValueHint, findParentAttribute, getAttribute, getAttributeName, getAttributeValue, getElementName, hasAnyAttribute, hasAttribute, hasEveryAttribute, isBuiltInElement, isFragmentElement, isJSXValue, isKeyedElement, isLineBreak, isLiteral, isPaddingSpaces, isUserDefinedElement, isWhiteSpace, toString };
138
+ export { DEFAULT_JSX_VALUE_HINT, JSXValueHint, findParentAttribute, getAttribute, getAttributeName, getAttributeValue, getElementType, hasAnyAttribute, hasAttribute, hasEveryAttribute, isBuiltInElement, isFragmentElement, isJSXValue, isKeyedElement, isLineBreak, isLiteral, isPaddingSpaces, isUserDefinedElement, isWhiteSpace, toString };
package/dist/index.js CHANGED
@@ -121,7 +121,7 @@ function getAttributeValue(node, name, initialScope) {
121
121
  return { kind: "none", node, initialScope };
122
122
  }
123
123
  }
124
- function getElementName(node) {
124
+ function getElementType(node) {
125
125
  if (node.type === types.AST_NODE_TYPES.JSXFragment) {
126
126
  return "";
127
127
  }
@@ -245,7 +245,7 @@ function isJSXValue(node, jsxCtx, hint = DEFAULT_JSX_VALUE_HINT) {
245
245
  }
246
246
  function isFragmentElement(node) {
247
247
  if (node.type !== types.AST_NODE_TYPES.JSXElement) return false;
248
- return getElementName(node).split(".").at(-1) === "Fragment";
248
+ return getElementType(node).split(".").at(-1) === "Fragment";
249
249
  }
250
250
  function isKeyedElement(node, initialScope) {
251
251
  return node.type === types.AST_NODE_TYPES.JSXElement && hasAttribute("key", node.openingElement.attributes, initialScope);
@@ -273,7 +273,7 @@ exports.findParentAttribute = findParentAttribute;
273
273
  exports.getAttribute = getAttribute;
274
274
  exports.getAttributeName = getAttributeName;
275
275
  exports.getAttributeValue = getAttributeValue;
276
- exports.getElementName = getElementName;
276
+ exports.getElementType = getElementType;
277
277
  exports.hasAnyAttribute = hasAnyAttribute;
278
278
  exports.hasAttribute = hasAttribute;
279
279
  exports.hasEveryAttribute = hasEveryAttribute;
package/dist/index.mjs CHANGED
@@ -98,7 +98,7 @@ function getAttributeValue(node, name, initialScope) {
98
98
  return { kind: "none", node, initialScope };
99
99
  }
100
100
  }
101
- function getElementName(node) {
101
+ function getElementType(node) {
102
102
  if (node.type === AST_NODE_TYPES.JSXFragment) {
103
103
  return "";
104
104
  }
@@ -222,7 +222,7 @@ function isJSXValue(node, jsxCtx, hint = DEFAULT_JSX_VALUE_HINT) {
222
222
  }
223
223
  function isFragmentElement(node) {
224
224
  if (node.type !== AST_NODE_TYPES.JSXElement) return false;
225
- return getElementName(node).split(".").at(-1) === "Fragment";
225
+ return getElementType(node).split(".").at(-1) === "Fragment";
226
226
  }
227
227
  function isKeyedElement(node, initialScope) {
228
228
  return node.type === AST_NODE_TYPES.JSXElement && hasAttribute("key", node.openingElement.attributes, initialScope);
@@ -244,4 +244,4 @@ function isPaddingSpaces(node) {
244
244
  return isLiteral(node) && isWhiteSpace(node) && node.raw.includes("\n");
245
245
  }
246
246
 
247
- export { DEFAULT_JSX_VALUE_HINT, JSXValueHint, findParentAttribute, getAttribute, getAttributeName, getAttributeValue, getElementName, hasAnyAttribute, hasAttribute, hasEveryAttribute, isBuiltInElement, isFragmentElement, isJSXValue, isKeyedElement, isLineBreak, isLiteral, isPaddingSpaces, isUserDefinedElement, isWhiteSpace, toString };
247
+ export { DEFAULT_JSX_VALUE_HINT, JSXValueHint, findParentAttribute, getAttribute, getAttributeName, getAttributeValue, getElementType, hasAnyAttribute, hasAttribute, hasEveryAttribute, isBuiltInElement, isFragmentElement, isJSXValue, isKeyedElement, isLineBreak, isLiteral, isPaddingSpaces, isUserDefinedElement, isWhiteSpace, toString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/jsx",
3
- "version": "1.29.1-beta.5",
3
+ "version": "1.29.1-beta.8",
4
4
  "description": "ESLint React's TSESTree AST utility module for static analysis of JSX.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -39,9 +39,9 @@
39
39
  "@typescript-eslint/types": "^8.25.0",
40
40
  "@typescript-eslint/utils": "^8.25.0",
41
41
  "ts-pattern": "^5.6.2",
42
- "@eslint-react/ast": "1.29.1-beta.5",
43
- "@eslint-react/eff": "1.29.1-beta.5",
44
- "@eslint-react/var": "1.29.1-beta.5"
42
+ "@eslint-react/ast": "1.29.1-beta.8",
43
+ "@eslint-react/eff": "1.29.1-beta.8",
44
+ "@eslint-react/var": "1.29.1-beta.8"
45
45
  },
46
46
  "devDependencies": {
47
47
  "tsup": "^8.4.0",