pasika 0.10.37 → 0.10.38
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.
|
@@ -2844,6 +2844,7 @@ function tagName(node) {
|
|
|
2844
2844
|
function isInteractive(node) {
|
|
2845
2845
|
const name = tagName(node);
|
|
2846
2846
|
if (name === void 0 || !INTERACTIVE_TAGS.has(name)) return false;
|
|
2847
|
+
if (name === "button") return true;
|
|
2847
2848
|
const attributes = node.openingElement?.attributes;
|
|
2848
2849
|
if (!attributes) return false;
|
|
2849
2850
|
return attributes.some(
|
|
@@ -2953,7 +2954,10 @@ var interactiveComponentRule = {
|
|
|
2953
2954
|
JSXElement(node) {
|
|
2954
2955
|
if (!isInteractive(node)) return;
|
|
2955
2956
|
if (isComponentElement(node.parent)) {
|
|
2956
|
-
|
|
2957
|
+
const name2 = tagName(node);
|
|
2958
|
+
if (name2 !== "button" || isComponentRoot(node.parent)) {
|
|
2959
|
+
return;
|
|
2960
|
+
}
|
|
2957
2961
|
}
|
|
2958
2962
|
if (isInteractive(node.parent)) {
|
|
2959
2963
|
return;
|