@eslint-react/jsx 1.16.2-next.8 → 1.16.2
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 +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -72,18 +72,18 @@ declare function hasAnyProp(attributes: (TSESTree.JSXAttribute | TSESTree.JSXSpr
|
|
|
72
72
|
declare function hasEveryProp(attributes: (TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute)[], propNames: string[], initialScope: Scope): boolean;
|
|
73
73
|
|
|
74
74
|
declare function isKeyedElement(node: TSESTree.Node, initialScope: Scope): boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Check if a node is a `JSXElement` of `User-Defined Component` type
|
|
77
|
-
* @param node The AST node to check
|
|
78
|
-
* @returns `true` if the node is a `JSXElement` of `User-Defined Component` type
|
|
79
|
-
*/
|
|
80
|
-
declare function isUserDefinedElement(node: TSESTree.Node): boolean;
|
|
81
75
|
/**
|
|
82
76
|
* Check if a node is a `JSXFragment` of `Built-in Component` type
|
|
83
77
|
* @param node The AST node to check
|
|
84
78
|
* @returns `true` if the node is a `JSXFragment` of `Built-in Component` type
|
|
85
79
|
*/
|
|
86
80
|
declare function isBuiltInElement(node: TSESTree.Node): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Check if a node is a `JSXElement` of `User-Defined Component` type
|
|
83
|
+
* @param node The AST node to check
|
|
84
|
+
* @returns `true` if the node is a `JSXElement` of `User-Defined Component` type
|
|
85
|
+
*/
|
|
86
|
+
declare function isUserDefinedElement(node: TSESTree.Node): boolean;
|
|
87
87
|
|
|
88
88
|
declare const JSXValueHint: {
|
|
89
89
|
readonly None: 0n;
|
|
@@ -107,7 +107,7 @@ declare const DEFAULT_JSX_VALUE_HINT: bigint;
|
|
|
107
107
|
* @param hint The `JSXValueHint` to use
|
|
108
108
|
* @returns boolean
|
|
109
109
|
*/
|
|
110
|
-
declare function isJSXValue(node: TSESTree$1.Node |
|
|
110
|
+
declare function isJSXValue(node: null | TSESTree$1.Node | undefined, jsxCtx: {
|
|
111
111
|
getScope: (node: TSESTree$1.Node) => Scope;
|
|
112
112
|
}, hint?: bigint): boolean;
|
|
113
113
|
|
package/dist/index.d.ts
CHANGED
|
@@ -72,18 +72,18 @@ declare function hasAnyProp(attributes: (TSESTree.JSXAttribute | TSESTree.JSXSpr
|
|
|
72
72
|
declare function hasEveryProp(attributes: (TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute)[], propNames: string[], initialScope: Scope): boolean;
|
|
73
73
|
|
|
74
74
|
declare function isKeyedElement(node: TSESTree.Node, initialScope: Scope): boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Check if a node is a `JSXElement` of `User-Defined Component` type
|
|
77
|
-
* @param node The AST node to check
|
|
78
|
-
* @returns `true` if the node is a `JSXElement` of `User-Defined Component` type
|
|
79
|
-
*/
|
|
80
|
-
declare function isUserDefinedElement(node: TSESTree.Node): boolean;
|
|
81
75
|
/**
|
|
82
76
|
* Check if a node is a `JSXFragment` of `Built-in Component` type
|
|
83
77
|
* @param node The AST node to check
|
|
84
78
|
* @returns `true` if the node is a `JSXFragment` of `Built-in Component` type
|
|
85
79
|
*/
|
|
86
80
|
declare function isBuiltInElement(node: TSESTree.Node): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Check if a node is a `JSXElement` of `User-Defined Component` type
|
|
83
|
+
* @param node The AST node to check
|
|
84
|
+
* @returns `true` if the node is a `JSXElement` of `User-Defined Component` type
|
|
85
|
+
*/
|
|
86
|
+
declare function isUserDefinedElement(node: TSESTree.Node): boolean;
|
|
87
87
|
|
|
88
88
|
declare const JSXValueHint: {
|
|
89
89
|
readonly None: 0n;
|
|
@@ -107,7 +107,7 @@ declare const DEFAULT_JSX_VALUE_HINT: bigint;
|
|
|
107
107
|
* @param hint The `JSXValueHint` to use
|
|
108
108
|
* @returns boolean
|
|
109
109
|
*/
|
|
110
|
-
declare function isJSXValue(node: TSESTree$1.Node |
|
|
110
|
+
declare function isJSXValue(node: null | TSESTree$1.Node | undefined, jsxCtx: {
|
|
111
111
|
getScope: (node: TSESTree$1.Node) => Scope;
|
|
112
112
|
}, hint?: bigint): boolean;
|
|
113
113
|
|
package/dist/index.js
CHANGED
|
@@ -184,12 +184,12 @@ function hasEveryProp(attributes, propNames, initialScope) {
|
|
|
184
184
|
function isKeyedElement(node, initialScope) {
|
|
185
185
|
return node.type === types.AST_NODE_TYPES.JSXElement && hasProp(node.openingElement.attributes, "key", initialScope);
|
|
186
186
|
}
|
|
187
|
-
function isUserDefinedElement(node) {
|
|
188
|
-
return node.type === types.AST_NODE_TYPES.JSXElement && node.openingElement.name.type === types.AST_NODE_TYPES.JSXIdentifier && /^[A-Z]/u.test(node.openingElement.name.name);
|
|
189
|
-
}
|
|
190
187
|
function isBuiltInElement(node) {
|
|
191
188
|
return node.type === types.AST_NODE_TYPES.JSXElement && node.openingElement.name.type === types.AST_NODE_TYPES.JSXIdentifier && node.openingElement.name.name.toLowerCase() === node.openingElement.name.name && /^[a-z]/u.test(node.openingElement.name.name);
|
|
192
189
|
}
|
|
190
|
+
function isUserDefinedElement(node) {
|
|
191
|
+
return node.type === types.AST_NODE_TYPES.JSXElement && node.openingElement.name.type === types.AST_NODE_TYPES.JSXIdentifier && /^[A-Z]/u.test(node.openingElement.name.name);
|
|
192
|
+
}
|
|
193
193
|
var JSXValueHint = {
|
|
194
194
|
None: 0n,
|
|
195
195
|
SkipNullLiteral: 1n << 0n,
|
package/dist/index.mjs
CHANGED
|
@@ -161,12 +161,12 @@ function hasEveryProp(attributes, propNames, initialScope) {
|
|
|
161
161
|
function isKeyedElement(node, initialScope) {
|
|
162
162
|
return node.type === AST_NODE_TYPES.JSXElement && hasProp(node.openingElement.attributes, "key", initialScope);
|
|
163
163
|
}
|
|
164
|
-
function isUserDefinedElement(node) {
|
|
165
|
-
return node.type === AST_NODE_TYPES.JSXElement && node.openingElement.name.type === AST_NODE_TYPES.JSXIdentifier && /^[A-Z]/u.test(node.openingElement.name.name);
|
|
166
|
-
}
|
|
167
164
|
function isBuiltInElement(node) {
|
|
168
165
|
return node.type === AST_NODE_TYPES.JSXElement && node.openingElement.name.type === AST_NODE_TYPES.JSXIdentifier && node.openingElement.name.name.toLowerCase() === node.openingElement.name.name && /^[a-z]/u.test(node.openingElement.name.name);
|
|
169
166
|
}
|
|
167
|
+
function isUserDefinedElement(node) {
|
|
168
|
+
return node.type === AST_NODE_TYPES.JSXElement && node.openingElement.name.type === AST_NODE_TYPES.JSXIdentifier && /^[A-Z]/u.test(node.openingElement.name.name);
|
|
169
|
+
}
|
|
170
170
|
var JSXValueHint = {
|
|
171
171
|
None: 0n,
|
|
172
172
|
SkipNullLiteral: 1n << 0n,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/jsx",
|
|
3
|
-
"version": "1.16.2
|
|
3
|
+
"version": "1.16.2",
|
|
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,10 +39,10 @@
|
|
|
39
39
|
"@typescript-eslint/types": "^8.15.0",
|
|
40
40
|
"@typescript-eslint/utils": "^8.15.0",
|
|
41
41
|
"ts-pattern": "^5.5.0",
|
|
42
|
-
"@eslint-react/ast": "1.16.2
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/var": "1.16.2
|
|
42
|
+
"@eslint-react/ast": "1.16.2",
|
|
43
|
+
"@eslint-react/tools": "1.16.2",
|
|
44
|
+
"@eslint-react/types": "1.16.2",
|
|
45
|
+
"@eslint-react/var": "1.16.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"tsup": "^8.3.5"
|