@eslint-react/jsx 1.5.4-next.1 → 1.5.4-next.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.
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1443,7 +1443,7 @@ function isPropertyOfPragma(name, context, pragma = getPragmaFromContext(context
|
|
|
1443
1443
|
}
|
|
1444
1444
|
function isFromPragma(name) {
|
|
1445
1445
|
return (node, context) => {
|
|
1446
|
-
const initialScope = context.sourceCode.getScope
|
|
1446
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
1447
1447
|
if (node.type === ast.NodeType.MemberExpression)
|
|
1448
1448
|
return isPropertyOfPragma(name, context)(node);
|
|
1449
1449
|
if (node.name === name)
|
|
@@ -1453,7 +1453,7 @@ function isFromPragma(name) {
|
|
|
1453
1453
|
}
|
|
1454
1454
|
function isFromPragmaMember(pragmaMemberName, name) {
|
|
1455
1455
|
return (node, context, pragma = getPragmaFromContext(context)) => {
|
|
1456
|
-
const initialScope = context.sourceCode.getScope
|
|
1456
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
1457
1457
|
if (node.property.type !== ast.NodeType.Identifier || node.property.name !== name)
|
|
1458
1458
|
return false;
|
|
1459
1459
|
if (node.object.type === ast.NodeType.Identifier && node.object.name === pragmaMemberName) {
|
|
@@ -1616,7 +1616,7 @@ function isJSXValue(node, context, hint = DEFAULT_JSX_VALUE_HINT) {
|
|
|
1616
1616
|
return !(hint & JSXValueHint.SkipUndefinedLiteral);
|
|
1617
1617
|
if (ast.isJSXTagNameExpression(node2))
|
|
1618
1618
|
return true;
|
|
1619
|
-
const initialScope = context.sourceCode.getScope
|
|
1619
|
+
const initialScope = context.sourceCode.getScope(node2);
|
|
1620
1620
|
const maybeVariable = _var.findVariable(name, initialScope);
|
|
1621
1621
|
return Function_exports.pipe(
|
|
1622
1622
|
maybeVariable,
|
|
@@ -1642,7 +1642,7 @@ function getProp(props, propName, context, initialScope) {
|
|
|
1642
1642
|
return findPropInAttributes(props, context, initialScope)(propName);
|
|
1643
1643
|
}
|
|
1644
1644
|
function getPropValue(attribute, context) {
|
|
1645
|
-
const initialScope = context.sourceCode.getScope
|
|
1645
|
+
const initialScope = context.sourceCode.getScope(attribute);
|
|
1646
1646
|
if (attribute.type === ast.NodeType.JSXAttribute && "value" in attribute) {
|
|
1647
1647
|
const { value } = attribute;
|
|
1648
1648
|
if (value === null)
|
package/dist/index.mjs
CHANGED
|
@@ -1437,7 +1437,7 @@ function isPropertyOfPragma(name, context, pragma = getPragmaFromContext(context
|
|
|
1437
1437
|
}
|
|
1438
1438
|
function isFromPragma(name) {
|
|
1439
1439
|
return (node, context) => {
|
|
1440
|
-
const initialScope = context.sourceCode.getScope
|
|
1440
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
1441
1441
|
if (node.type === NodeType.MemberExpression)
|
|
1442
1442
|
return isPropertyOfPragma(name, context)(node);
|
|
1443
1443
|
if (node.name === name)
|
|
@@ -1447,7 +1447,7 @@ function isFromPragma(name) {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
function isFromPragmaMember(pragmaMemberName, name) {
|
|
1449
1449
|
return (node, context, pragma = getPragmaFromContext(context)) => {
|
|
1450
|
-
const initialScope = context.sourceCode.getScope
|
|
1450
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
1451
1451
|
if (node.property.type !== NodeType.Identifier || node.property.name !== name)
|
|
1452
1452
|
return false;
|
|
1453
1453
|
if (node.object.type === NodeType.Identifier && node.object.name === pragmaMemberName) {
|
|
@@ -1610,7 +1610,7 @@ function isJSXValue(node, context, hint = DEFAULT_JSX_VALUE_HINT) {
|
|
|
1610
1610
|
return !(hint & JSXValueHint.SkipUndefinedLiteral);
|
|
1611
1611
|
if (isJSXTagNameExpression(node2))
|
|
1612
1612
|
return true;
|
|
1613
|
-
const initialScope = context.sourceCode.getScope
|
|
1613
|
+
const initialScope = context.sourceCode.getScope(node2);
|
|
1614
1614
|
const maybeVariable = findVariable(name, initialScope);
|
|
1615
1615
|
return Function_exports.pipe(
|
|
1616
1616
|
maybeVariable,
|
|
@@ -1636,7 +1636,7 @@ function getProp(props, propName, context, initialScope) {
|
|
|
1636
1636
|
return findPropInAttributes(props, context, initialScope)(propName);
|
|
1637
1637
|
}
|
|
1638
1638
|
function getPropValue(attribute, context) {
|
|
1639
|
-
const initialScope = context.sourceCode.getScope
|
|
1639
|
+
const initialScope = context.sourceCode.getScope(attribute);
|
|
1640
1640
|
if (attribute.type === NodeType.JSXAttribute && "value" in attribute) {
|
|
1641
1641
|
const { value } = attribute;
|
|
1642
1642
|
if (value === null)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/jsx",
|
|
3
|
-
"version": "1.5.4-next.
|
|
3
|
+
"version": "1.5.4-next.3",
|
|
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": {
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"./package.json"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@typescript-eslint/scope-manager": ">=
|
|
39
|
-
"@typescript-eslint/types": ">=
|
|
40
|
-
"@typescript-eslint/utils": ">=
|
|
38
|
+
"@typescript-eslint/scope-manager": ">=7.0.1",
|
|
39
|
+
"@typescript-eslint/types": ">=7.0.1",
|
|
40
|
+
"@typescript-eslint/utils": ">=7.0.1",
|
|
41
41
|
"micro-memoize": "4.1.2",
|
|
42
|
-
"@eslint-react/ast": "1.5.4-next.
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/types": "1.5.4-next.
|
|
46
|
-
"@eslint-react/var": "1.5.4-next.
|
|
42
|
+
"@eslint-react/ast": "1.5.4-next.3",
|
|
43
|
+
"@eslint-react/shared": "1.5.4-next.3",
|
|
44
|
+
"@eslint-react/tools": "1.5.4-next.3",
|
|
45
|
+
"@eslint-react/types": "1.5.4-next.3",
|
|
46
|
+
"@eslint-react/var": "1.5.4-next.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"effect": "2.3.3"
|