eslint-plugin-react-dom 1.16.0-beta.0 → 1.16.0-beta.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.js CHANGED
@@ -30,7 +30,7 @@ var AST__namespace = /*#__PURE__*/_interopNamespace(AST);
30
30
 
31
31
  // package.json
32
32
  var name = "eslint-plugin-react-dom";
33
- var version = "1.16.0-beta.0";
33
+ var version = "1.16.0-beta.2";
34
34
  var createRule = shared.createRuleForPlugin("dom");
35
35
 
36
36
  // src/rules/no-children-in-void-dom-elements.ts
@@ -405,7 +405,1053 @@ var no_script_url_default = createRule({
405
405
  },
406
406
  defaultOptions: []
407
407
  });
408
- var RULE_NAME10 = "no-unsafe-iframe-sandbox";
408
+
409
+ // src/rules/no-unknown-property.ts
410
+ var RULE_NAME10 = "no-unknown-property";
411
+ var DEFAULTS = {
412
+ ignore: [],
413
+ requireDataLowercase: false
414
+ };
415
+ var DOM_ATTRIBUTE_NAMES = {
416
+ "accept-charset": "acceptCharset",
417
+ class: "className",
418
+ crossorigin: "crossOrigin",
419
+ for: "htmlFor",
420
+ "http-equiv": "httpEquiv",
421
+ nomodule: "noModule"
422
+ };
423
+ var ATTRIBUTE_TAGS_MAP = {
424
+ as: ["link"],
425
+ abbr: ["th", "td"],
426
+ align: [
427
+ "applet",
428
+ "caption",
429
+ "col",
430
+ "colgroup",
431
+ "hr",
432
+ "iframe",
433
+ "img",
434
+ "table",
435
+ "tbody",
436
+ "td",
437
+ "tfoot",
438
+ "th",
439
+ "thead",
440
+ "tr"
441
+ ],
442
+ // deprecated, but known
443
+ allowFullScreen: ["iframe", "video"],
444
+ autoPictureInPicture: ["video"],
445
+ charset: ["meta"],
446
+ checked: ["input"],
447
+ controls: ["audio", "video"],
448
+ controlsList: ["audio", "video"],
449
+ // image is required for SVG support, all other tags are HTML.
450
+ crossOrigin: ["script", "img", "video", "audio", "link", "image"],
451
+ disablePictureInPicture: ["video"],
452
+ disableRemotePlayback: ["audio", "video"],
453
+ displaystyle: ["math"],
454
+ // https://html.spec.whatwg.org/multipage/links.html#downloading-resources
455
+ download: ["a", "area"],
456
+ fill: [
457
+ // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill
458
+ // Fill color
459
+ "altGlyph",
460
+ "circle",
461
+ "ellipse",
462
+ "g",
463
+ "line",
464
+ "marker",
465
+ "mask",
466
+ "path",
467
+ "polygon",
468
+ "polyline",
469
+ "rect",
470
+ "svg",
471
+ "symbol",
472
+ "text",
473
+ "textPath",
474
+ "tref",
475
+ "tspan",
476
+ "use",
477
+ // Animation final state
478
+ "animate",
479
+ "animateColor",
480
+ "animateMotion",
481
+ "animateTransform",
482
+ "set"
483
+ ],
484
+ focusable: ["svg"],
485
+ imageSizes: ["link"],
486
+ imageSrcSet: ["link"],
487
+ loop: ["audio", "video"],
488
+ mozAllowFullScreen: ["iframe", "video"],
489
+ muted: ["audio", "video"],
490
+ noModule: ["script"],
491
+ // Media events allowed only on audio and video tags, see https://github.com/facebook/react/blob/256aefbea1449869620fb26f6ec695536ab453f5/CHANGELOG.md#notable-enhancements
492
+ onAbort: ["audio", "video"],
493
+ onCanPlay: ["audio", "video"],
494
+ onCanPlayThrough: ["audio", "video"],
495
+ onCancel: ["dialog"],
496
+ onClose: ["dialog"],
497
+ onDurationChange: ["audio", "video"],
498
+ onEmptied: ["audio", "video"],
499
+ onEncrypted: ["audio", "video"],
500
+ onEnded: ["audio", "video"],
501
+ onError: ["audio", "video", "img", "link", "source", "script", "picture", "iframe"],
502
+ onLoad: ["script", "img", "link", "picture", "iframe", "object", "source"],
503
+ onLoadStart: ["audio", "video"],
504
+ onLoadedData: ["audio", "video"],
505
+ onLoadedMetadata: ["audio", "video"],
506
+ onPause: ["audio", "video"],
507
+ onPlay: ["audio", "video"],
508
+ onPlaying: ["audio", "video"],
509
+ onProgress: ["audio", "video"],
510
+ onRateChange: ["audio", "video"],
511
+ onResize: ["audio", "video"],
512
+ onSeeked: ["audio", "video"],
513
+ onSeeking: ["audio", "video"],
514
+ onStalled: ["audio", "video"],
515
+ onSuspend: ["audio", "video"],
516
+ onTimeUpdate: ["audio", "video"],
517
+ onVolumeChange: ["audio", "video"],
518
+ onWaiting: ["audio", "video"],
519
+ playsInline: ["video"],
520
+ poster: ["video"],
521
+ preload: ["audio", "video"],
522
+ property: ["meta"],
523
+ returnValue: ["dialog"],
524
+ scrolling: ["iframe"],
525
+ valign: ["tr", "td", "th", "thead", "tbody", "tfoot", "colgroup", "col"],
526
+ // deprecated, but known
527
+ viewBox: ["marker", "pattern", "svg", "symbol", "view"],
528
+ webkitAllowFullScreen: ["iframe", "video"],
529
+ webkitDirectory: ["input"]
530
+ };
531
+ var SVGDOM_ATTRIBUTE_NAMES = {
532
+ "accent-height": "accentHeight",
533
+ "alignment-baseline": "alignmentBaseline",
534
+ "arabic-form": "arabicForm",
535
+ "baseline-shift": "baselineShift",
536
+ "cap-height": "capHeight",
537
+ "clip-path": "clipPath",
538
+ "clip-rule": "clipRule",
539
+ "color-interpolation": "colorInterpolation",
540
+ "color-interpolation-filters": "colorInterpolationFilters",
541
+ "color-profile": "colorProfile",
542
+ "color-rendering": "colorRendering",
543
+ "dominant-baseline": "dominantBaseline",
544
+ "enable-background": "enableBackground",
545
+ "fill-opacity": "fillOpacity",
546
+ "fill-rule": "fillRule",
547
+ "flood-color": "floodColor",
548
+ "flood-opacity": "floodOpacity",
549
+ "font-family": "fontFamily",
550
+ "font-size": "fontSize",
551
+ "font-size-adjust": "fontSizeAdjust",
552
+ "font-stretch": "fontStretch",
553
+ "font-style": "fontStyle",
554
+ "font-variant": "fontVariant",
555
+ "font-weight": "fontWeight",
556
+ "glyph-name": "glyphName",
557
+ "glyph-orientation-horizontal": "glyphOrientationHorizontal",
558
+ "glyph-orientation-vertical": "glyphOrientationVertical",
559
+ "horiz-adv-x": "horizAdvX",
560
+ "horiz-origin-x": "horizOriginX",
561
+ "image-rendering": "imageRendering",
562
+ "letter-spacing": "letterSpacing",
563
+ "lighting-color": "lightingColor",
564
+ "marker-end": "markerEnd",
565
+ "marker-mid": "markerMid",
566
+ "marker-start": "markerStart",
567
+ "overline-position": "overlinePosition",
568
+ "overline-thickness": "overlineThickness",
569
+ "paint-order": "paintOrder",
570
+ "panose-1": "panose1",
571
+ "pointer-events": "pointerEvents",
572
+ "rendering-intent": "renderingIntent",
573
+ "shape-rendering": "shapeRendering",
574
+ "stop-color": "stopColor",
575
+ "stop-opacity": "stopOpacity",
576
+ "strikethrough-position": "strikethroughPosition",
577
+ "strikethrough-thickness": "strikethroughThickness",
578
+ "stroke-dasharray": "strokeDasharray",
579
+ "stroke-dashoffset": "strokeDashoffset",
580
+ "stroke-linecap": "strokeLinecap",
581
+ "stroke-linejoin": "strokeLinejoin",
582
+ "stroke-miterlimit": "strokeMiterlimit",
583
+ "stroke-opacity": "strokeOpacity",
584
+ "stroke-width": "strokeWidth",
585
+ "text-anchor": "textAnchor",
586
+ "text-decoration": "textDecoration",
587
+ "text-rendering": "textRendering",
588
+ "underline-position": "underlinePosition",
589
+ "underline-thickness": "underlineThickness",
590
+ "unicode-bidi": "unicodeBidi",
591
+ "unicode-range": "unicodeRange",
592
+ "units-per-em": "unitsPerEm",
593
+ "v-alphabetic": "vAlphabetic",
594
+ "v-hanging": "vHanging",
595
+ "v-ideographic": "vIdeographic",
596
+ "v-mathematical": "vMathematical",
597
+ "vector-effect": "vectorEffect",
598
+ "vert-adv-y": "vertAdvY",
599
+ "vert-origin-x": "vertOriginX",
600
+ "vert-origin-y": "vertOriginY",
601
+ "word-spacing": "wordSpacing",
602
+ "writing-mode": "writingMode",
603
+ "x-height": "xHeight",
604
+ "xlink:actuate": "xlinkActuate",
605
+ "xlink:arcrole": "xlinkArcrole",
606
+ "xlink:href": "xlinkHref",
607
+ "xlink:role": "xlinkRole",
608
+ "xlink:show": "xlinkShow",
609
+ "xlink:title": "xlinkTitle",
610
+ "xlink:type": "xlinkType",
611
+ "xml:base": "xmlBase",
612
+ "xml:lang": "xmlLang",
613
+ "xml:space": "xmlSpace"
614
+ };
615
+ var DOM_PROPERTY_NAMES_ONE_WORD = [
616
+ // Global attributes - can be used on any HTML/DOM element
617
+ // See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
618
+ "dir",
619
+ "draggable",
620
+ "hidden",
621
+ "id",
622
+ "lang",
623
+ "nonce",
624
+ "part",
625
+ "slot",
626
+ "style",
627
+ "title",
628
+ "translate",
629
+ "inert",
630
+ // Element specific attributes
631
+ // See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes (includes global attributes too)
632
+ // To be considered if these should be added also to ATTRIBUTE_TAGS_MAP
633
+ "accept",
634
+ "action",
635
+ "allow",
636
+ "alt",
637
+ "as",
638
+ "async",
639
+ "buffered",
640
+ "capture",
641
+ "challenge",
642
+ "cite",
643
+ "code",
644
+ "cols",
645
+ "content",
646
+ "coords",
647
+ "csp",
648
+ "data",
649
+ "decoding",
650
+ "default",
651
+ "defer",
652
+ "disabled",
653
+ "form",
654
+ "headers",
655
+ "height",
656
+ "high",
657
+ "href",
658
+ "icon",
659
+ "importance",
660
+ "integrity",
661
+ "kind",
662
+ "label",
663
+ "language",
664
+ "loading",
665
+ "list",
666
+ "loop",
667
+ "low",
668
+ "manifest",
669
+ "max",
670
+ "media",
671
+ "method",
672
+ "min",
673
+ "multiple",
674
+ "muted",
675
+ "name",
676
+ "open",
677
+ "optimum",
678
+ "pattern",
679
+ "ping",
680
+ "placeholder",
681
+ "poster",
682
+ "preload",
683
+ "profile",
684
+ "rel",
685
+ "required",
686
+ "reversed",
687
+ "role",
688
+ "rows",
689
+ "sandbox",
690
+ "scope",
691
+ "seamless",
692
+ "selected",
693
+ "shape",
694
+ "size",
695
+ "sizes",
696
+ "span",
697
+ "src",
698
+ "start",
699
+ "step",
700
+ "summary",
701
+ "target",
702
+ "type",
703
+ "value",
704
+ "width",
705
+ "wmode",
706
+ "wrap",
707
+ // SVG attributes
708
+ // See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
709
+ "accumulate",
710
+ "additive",
711
+ "alphabetic",
712
+ "amplitude",
713
+ "ascent",
714
+ "azimuth",
715
+ "bbox",
716
+ "begin",
717
+ "bias",
718
+ "by",
719
+ "clip",
720
+ "color",
721
+ "cursor",
722
+ "cx",
723
+ "cy",
724
+ "d",
725
+ "decelerate",
726
+ "descent",
727
+ "direction",
728
+ "display",
729
+ "divisor",
730
+ "dur",
731
+ "dx",
732
+ "dy",
733
+ "elevation",
734
+ "end",
735
+ "exponent",
736
+ "fill",
737
+ "filter",
738
+ "format",
739
+ "from",
740
+ "fr",
741
+ "fx",
742
+ "fy",
743
+ "g1",
744
+ "g2",
745
+ "hanging",
746
+ "height",
747
+ "hreflang",
748
+ "ideographic",
749
+ "in",
750
+ "in2",
751
+ "intercept",
752
+ "k",
753
+ "k1",
754
+ "k2",
755
+ "k3",
756
+ "k4",
757
+ "kerning",
758
+ "local",
759
+ "mask",
760
+ "mode",
761
+ "offset",
762
+ "opacity",
763
+ "operator",
764
+ "order",
765
+ "orient",
766
+ "orientation",
767
+ "origin",
768
+ "overflow",
769
+ "path",
770
+ "ping",
771
+ "points",
772
+ "r",
773
+ "radius",
774
+ "rel",
775
+ "restart",
776
+ "result",
777
+ "rotate",
778
+ "rx",
779
+ "ry",
780
+ "scale",
781
+ "seed",
782
+ "slope",
783
+ "spacing",
784
+ "speed",
785
+ "stemh",
786
+ "stemv",
787
+ "string",
788
+ "stroke",
789
+ "to",
790
+ "transform",
791
+ "u1",
792
+ "u2",
793
+ "unicode",
794
+ "values",
795
+ "version",
796
+ "visibility",
797
+ "widths",
798
+ "x",
799
+ "x1",
800
+ "x2",
801
+ "xmlns",
802
+ "y",
803
+ "y1",
804
+ "y2",
805
+ "z",
806
+ // OpenGraph meta tag attributes
807
+ "property",
808
+ // React specific attributes
809
+ "ref",
810
+ "key",
811
+ "children",
812
+ // Non-standard
813
+ "results",
814
+ "security",
815
+ // Video specific
816
+ "controls",
817
+ // popovers
818
+ "popover",
819
+ "popovertarget",
820
+ "popovertargetaction"
821
+ ];
822
+ var DOM_PROPERTY_NAMES_TWO_WORDS = [
823
+ // Global attributes - can be used on any HTML/DOM element
824
+ // See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
825
+ "accessKey",
826
+ "autoCapitalize",
827
+ "autoFocus",
828
+ "contentEditable",
829
+ "enterKeyHint",
830
+ "exportParts",
831
+ "inputMode",
832
+ "itemID",
833
+ "itemRef",
834
+ "itemProp",
835
+ "itemScope",
836
+ "itemType",
837
+ "spellCheck",
838
+ "tabIndex",
839
+ // Element specific attributes
840
+ // See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes (includes global attributes too)
841
+ // To be considered if these should be added also to ATTRIBUTE_TAGS_MAP
842
+ "acceptCharset",
843
+ "autoComplete",
844
+ "autoPlay",
845
+ "border",
846
+ "cellPadding",
847
+ "cellSpacing",
848
+ "classID",
849
+ "codeBase",
850
+ "colSpan",
851
+ "contextMenu",
852
+ "dateTime",
853
+ "encType",
854
+ "formAction",
855
+ "formEncType",
856
+ "formMethod",
857
+ "formNoValidate",
858
+ "formTarget",
859
+ "frameBorder",
860
+ "hrefLang",
861
+ "httpEquiv",
862
+ "imageSizes",
863
+ "imageSrcSet",
864
+ "isMap",
865
+ "keyParams",
866
+ "keyType",
867
+ "marginHeight",
868
+ "marginWidth",
869
+ "maxLength",
870
+ "mediaGroup",
871
+ "minLength",
872
+ "noValidate",
873
+ "onAnimationEnd",
874
+ "onAnimationIteration",
875
+ "onAnimationStart",
876
+ "onBlur",
877
+ "onChange",
878
+ "onClick",
879
+ "onContextMenu",
880
+ "onCopy",
881
+ "onCompositionEnd",
882
+ "onCompositionStart",
883
+ "onCompositionUpdate",
884
+ "onCut",
885
+ "onDoubleClick",
886
+ "onDrag",
887
+ "onDragEnd",
888
+ "onDragEnter",
889
+ "onDragExit",
890
+ "onDragLeave",
891
+ "onError",
892
+ "onFocus",
893
+ "onInput",
894
+ "onKeyDown",
895
+ "onKeyPress",
896
+ "onKeyUp",
897
+ "onLoad",
898
+ "onWheel",
899
+ "onDragOver",
900
+ "onDragStart",
901
+ "onDrop",
902
+ "onMouseDown",
903
+ "onMouseEnter",
904
+ "onMouseLeave",
905
+ "onMouseMove",
906
+ "onMouseOut",
907
+ "onMouseOver",
908
+ "onMouseUp",
909
+ "onPaste",
910
+ "onScroll",
911
+ "onSelect",
912
+ "onSubmit",
913
+ "onToggle",
914
+ "onTransitionEnd",
915
+ "radioGroup",
916
+ "readOnly",
917
+ "referrerPolicy",
918
+ "rowSpan",
919
+ "srcDoc",
920
+ "srcLang",
921
+ "srcSet",
922
+ "useMap",
923
+ "fetchPriority",
924
+ // SVG attributes
925
+ // See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
926
+ "crossOrigin",
927
+ "accentHeight",
928
+ "alignmentBaseline",
929
+ "arabicForm",
930
+ "attributeName",
931
+ "attributeType",
932
+ "baseFrequency",
933
+ "baselineShift",
934
+ "baseProfile",
935
+ "calcMode",
936
+ "capHeight",
937
+ "clipPathUnits",
938
+ "clipPath",
939
+ "clipRule",
940
+ "colorInterpolation",
941
+ "colorInterpolationFilters",
942
+ "colorProfile",
943
+ "colorRendering",
944
+ "contentScriptType",
945
+ "contentStyleType",
946
+ "diffuseConstant",
947
+ "dominantBaseline",
948
+ "edgeMode",
949
+ "enableBackground",
950
+ "fillOpacity",
951
+ "fillRule",
952
+ "filterRes",
953
+ "filterUnits",
954
+ "floodColor",
955
+ "floodOpacity",
956
+ "fontFamily",
957
+ "fontSize",
958
+ "fontSizeAdjust",
959
+ "fontStretch",
960
+ "fontStyle",
961
+ "fontVariant",
962
+ "fontWeight",
963
+ "glyphName",
964
+ "glyphOrientationHorizontal",
965
+ "glyphOrientationVertical",
966
+ "glyphRef",
967
+ "gradientTransform",
968
+ "gradientUnits",
969
+ "horizAdvX",
970
+ "horizOriginX",
971
+ "imageRendering",
972
+ "kernelMatrix",
973
+ "kernelUnitLength",
974
+ "keyPoints",
975
+ "keySplines",
976
+ "keyTimes",
977
+ "lengthAdjust",
978
+ "letterSpacing",
979
+ "lightingColor",
980
+ "limitingConeAngle",
981
+ "markerEnd",
982
+ "markerMid",
983
+ "markerStart",
984
+ "markerHeight",
985
+ "markerUnits",
986
+ "markerWidth",
987
+ "maskContentUnits",
988
+ "maskUnits",
989
+ "mathematical",
990
+ "numOctaves",
991
+ "overlinePosition",
992
+ "overlineThickness",
993
+ "panose1",
994
+ "paintOrder",
995
+ "pathLength",
996
+ "patternContentUnits",
997
+ "patternTransform",
998
+ "patternUnits",
999
+ "pointerEvents",
1000
+ "pointsAtX",
1001
+ "pointsAtY",
1002
+ "pointsAtZ",
1003
+ "preserveAlpha",
1004
+ "preserveAspectRatio",
1005
+ "primitiveUnits",
1006
+ "referrerPolicy",
1007
+ "refX",
1008
+ "refY",
1009
+ "rendering-intent",
1010
+ "repeatCount",
1011
+ "repeatDur",
1012
+ "requiredExtensions",
1013
+ "requiredFeatures",
1014
+ "shapeRendering",
1015
+ "specularConstant",
1016
+ "specularExponent",
1017
+ "spreadMethod",
1018
+ "startOffset",
1019
+ "stdDeviation",
1020
+ "stitchTiles",
1021
+ "stopColor",
1022
+ "stopOpacity",
1023
+ "strikethroughPosition",
1024
+ "strikethroughThickness",
1025
+ "strokeDasharray",
1026
+ "strokeDashoffset",
1027
+ "strokeLinecap",
1028
+ "strokeLinejoin",
1029
+ "strokeMiterlimit",
1030
+ "strokeOpacity",
1031
+ "strokeWidth",
1032
+ "surfaceScale",
1033
+ "systemLanguage",
1034
+ "tableValues",
1035
+ "targetX",
1036
+ "targetY",
1037
+ "textAnchor",
1038
+ "textDecoration",
1039
+ "textRendering",
1040
+ "textLength",
1041
+ "transformOrigin",
1042
+ "underlinePosition",
1043
+ "underlineThickness",
1044
+ "unicodeBidi",
1045
+ "unicodeRange",
1046
+ "unitsPerEm",
1047
+ "vAlphabetic",
1048
+ "vHanging",
1049
+ "vIdeographic",
1050
+ "vMathematical",
1051
+ "vectorEffect",
1052
+ "vertAdvY",
1053
+ "vertOriginX",
1054
+ "vertOriginY",
1055
+ "viewBox",
1056
+ "viewTarget",
1057
+ "wordSpacing",
1058
+ "writingMode",
1059
+ "xHeight",
1060
+ "xChannelSelector",
1061
+ "xlinkActuate",
1062
+ "xlinkArcrole",
1063
+ "xlinkHref",
1064
+ "xlinkRole",
1065
+ "xlinkShow",
1066
+ "xlinkTitle",
1067
+ "xlinkType",
1068
+ "xmlBase",
1069
+ "xmlLang",
1070
+ "xmlnsXlink",
1071
+ "xmlSpace",
1072
+ "yChannelSelector",
1073
+ "zoomAndPan",
1074
+ // Safari/Apple specific, no listing available
1075
+ "autoCorrect",
1076
+ // https://stackoverflow.com/questions/47985384/html-autocorrect-for-text-input-is-not-working
1077
+ "autoSave",
1078
+ // https://stackoverflow.com/questions/25456396/what-is-autosave-attribute-supposed-to-do-how-do-i-use-it
1079
+ // React specific attributes https://reactjs.org/docs/dom-elements.html#differences-in-attributes
1080
+ "className",
1081
+ "dangerouslySetInnerHTML",
1082
+ "defaultValue",
1083
+ "defaultChecked",
1084
+ "htmlFor",
1085
+ // Events' capture events
1086
+ "onBeforeInput",
1087
+ "onChange",
1088
+ "onInvalid",
1089
+ "onReset",
1090
+ "onTouchCancel",
1091
+ "onTouchEnd",
1092
+ "onTouchMove",
1093
+ "onTouchStart",
1094
+ "suppressContentEditableWarning",
1095
+ "suppressHydrationWarning",
1096
+ "onAbort",
1097
+ "onCanPlay",
1098
+ "onCanPlayThrough",
1099
+ "onDurationChange",
1100
+ "onEmptied",
1101
+ "onEncrypted",
1102
+ "onEnded",
1103
+ "onLoadedData",
1104
+ "onLoadedMetadata",
1105
+ "onLoadStart",
1106
+ "onPause",
1107
+ "onPlay",
1108
+ "onPlaying",
1109
+ "onProgress",
1110
+ "onRateChange",
1111
+ "onResize",
1112
+ "onSeeked",
1113
+ "onSeeking",
1114
+ "onStalled",
1115
+ "onSuspend",
1116
+ "onTimeUpdate",
1117
+ "onVolumeChange",
1118
+ "onWaiting",
1119
+ "onCopyCapture",
1120
+ "onCutCapture",
1121
+ "onPasteCapture",
1122
+ "onCompositionEndCapture",
1123
+ "onCompositionStartCapture",
1124
+ "onCompositionUpdateCapture",
1125
+ "onFocusCapture",
1126
+ "onBlurCapture",
1127
+ "onChangeCapture",
1128
+ "onBeforeInputCapture",
1129
+ "onInputCapture",
1130
+ "onResetCapture",
1131
+ "onSubmitCapture",
1132
+ "onInvalidCapture",
1133
+ "onLoadCapture",
1134
+ "onErrorCapture",
1135
+ "onKeyDownCapture",
1136
+ "onKeyPressCapture",
1137
+ "onKeyUpCapture",
1138
+ "onAbortCapture",
1139
+ "onCanPlayCapture",
1140
+ "onCanPlayThroughCapture",
1141
+ "onDurationChangeCapture",
1142
+ "onEmptiedCapture",
1143
+ "onEncryptedCapture",
1144
+ "onEndedCapture",
1145
+ "onLoadedDataCapture",
1146
+ "onLoadedMetadataCapture",
1147
+ "onLoadStartCapture",
1148
+ "onPauseCapture",
1149
+ "onPlayCapture",
1150
+ "onPlayingCapture",
1151
+ "onProgressCapture",
1152
+ "onRateChangeCapture",
1153
+ "onSeekedCapture",
1154
+ "onSeekingCapture",
1155
+ "onStalledCapture",
1156
+ "onSuspendCapture",
1157
+ "onTimeUpdateCapture",
1158
+ "onVolumeChangeCapture",
1159
+ "onWaitingCapture",
1160
+ "onSelectCapture",
1161
+ "onTouchCancelCapture",
1162
+ "onTouchEndCapture",
1163
+ "onTouchMoveCapture",
1164
+ "onTouchStartCapture",
1165
+ "onScrollCapture",
1166
+ "onWheelCapture",
1167
+ "onAnimationEndCapture",
1168
+ "onAnimationIteration",
1169
+ "onAnimationStartCapture",
1170
+ "onTransitionEndCapture",
1171
+ "onAuxClick",
1172
+ "onAuxClickCapture",
1173
+ "onClickCapture",
1174
+ "onContextMenuCapture",
1175
+ "onDoubleClickCapture",
1176
+ "onDragCapture",
1177
+ "onDragEndCapture",
1178
+ "onDragEnterCapture",
1179
+ "onDragExitCapture",
1180
+ "onDragLeaveCapture",
1181
+ "onDragOverCapture",
1182
+ "onDragStartCapture",
1183
+ "onDropCapture",
1184
+ "onMouseDown",
1185
+ "onMouseDownCapture",
1186
+ "onMouseMoveCapture",
1187
+ "onMouseOutCapture",
1188
+ "onMouseOverCapture",
1189
+ "onMouseUpCapture",
1190
+ // Video specific
1191
+ "autoPictureInPicture",
1192
+ "controlsList",
1193
+ "disablePictureInPicture",
1194
+ "disableRemotePlayback"
1195
+ ];
1196
+ var DOM_PROPERTIES_IGNORE_CASE = [
1197
+ "charset",
1198
+ "allowFullScreen",
1199
+ "webkitAllowFullScreen",
1200
+ "mozAllowFullScreen",
1201
+ "webkitDirectory"
1202
+ ];
1203
+ var ARIA_PROPERTIES = [
1204
+ // See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes
1205
+ // Global attributes
1206
+ "aria-atomic",
1207
+ "aria-braillelabel",
1208
+ "aria-brailleroledescription",
1209
+ "aria-busy",
1210
+ "aria-controls",
1211
+ "aria-current",
1212
+ "aria-describedby",
1213
+ "aria-description",
1214
+ "aria-details",
1215
+ "aria-disabled",
1216
+ "aria-dropeffect",
1217
+ "aria-errormessage",
1218
+ "aria-flowto",
1219
+ "aria-grabbed",
1220
+ "aria-haspopup",
1221
+ "aria-hidden",
1222
+ "aria-invalid",
1223
+ "aria-keyshortcuts",
1224
+ "aria-label",
1225
+ "aria-labelledby",
1226
+ "aria-live",
1227
+ "aria-owns",
1228
+ "aria-relevant",
1229
+ "aria-roledescription",
1230
+ // Widget attributes
1231
+ "aria-autocomplete",
1232
+ "aria-checked",
1233
+ "aria-expanded",
1234
+ "aria-level",
1235
+ "aria-modal",
1236
+ "aria-multiline",
1237
+ "aria-multiselectable",
1238
+ "aria-orientation",
1239
+ "aria-placeholder",
1240
+ "aria-pressed",
1241
+ "aria-readonly",
1242
+ "aria-required",
1243
+ "aria-selected",
1244
+ "aria-sort",
1245
+ "aria-valuemax",
1246
+ "aria-valuemin",
1247
+ "aria-valuenow",
1248
+ "aria-valuetext",
1249
+ // Relationship attributes
1250
+ "aria-activedescendant",
1251
+ "aria-colcount",
1252
+ "aria-colindex",
1253
+ "aria-colindextext",
1254
+ "aria-colspan",
1255
+ "aria-posinset",
1256
+ "aria-rowcount",
1257
+ "aria-rowindex",
1258
+ "aria-rowindextext",
1259
+ "aria-rowspan",
1260
+ "aria-setsize"
1261
+ ];
1262
+ var REACT_ON_PROPS = [
1263
+ "onGotPointerCapture",
1264
+ "onGotPointerCaptureCapture",
1265
+ "onLostPointerCapture",
1266
+ "onLostPointerCapture",
1267
+ "onLostPointerCaptureCapture",
1268
+ "onPointerCancel",
1269
+ "onPointerCancelCapture",
1270
+ "onPointerDown",
1271
+ "onPointerDownCapture",
1272
+ "onPointerEnter",
1273
+ "onPointerEnterCapture",
1274
+ "onPointerLeave",
1275
+ "onPointerLeaveCapture",
1276
+ "onPointerMove",
1277
+ "onPointerMoveCapture",
1278
+ "onPointerOut",
1279
+ "onPointerOutCapture",
1280
+ "onPointerOver",
1281
+ "onPointerOverCapture",
1282
+ "onPointerUp",
1283
+ "onPointerUpCapture"
1284
+ ];
1285
+ function getDOMPropertyNames(context) {
1286
+ const ALL_DOM_PROPERTY_NAMES = DOM_PROPERTY_NAMES_TWO_WORDS.concat(DOM_PROPERTY_NAMES_ONE_WORD);
1287
+ {
1288
+ return ALL_DOM_PROPERTY_NAMES.concat(REACT_ON_PROPS);
1289
+ }
1290
+ }
1291
+ function isValidHTMLTagInJSX(childNode) {
1292
+ const tagConvention = /^[a-z][^-]*$/;
1293
+ if (tagConvention.test(childNode.parent.name.name)) {
1294
+ return !childNode.parent.attributes.some(
1295
+ (attrNode) => attrNode.type === "JSXAttribute" && attrNode.name.type === "JSXIdentifier" && attrNode.name.name === "is"
1296
+ // To learn more about custom web components and `is` attribute,
1297
+ // see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-customized-builtin-example
1298
+ );
1299
+ }
1300
+ return false;
1301
+ }
1302
+ function normalizeAttributeCase(name2) {
1303
+ return DOM_PROPERTIES_IGNORE_CASE.find((element) => element.toLowerCase() === name2.toLowerCase()) || name2;
1304
+ }
1305
+ function isValidDataAttribute(name2) {
1306
+ return !/^data-xml/i.test(name2) && /^data-[^:]*$/.test(name2);
1307
+ }
1308
+ function hasUpperCaseCharacter(name2) {
1309
+ return name2.toLowerCase() !== name2;
1310
+ }
1311
+ function isValidAriaAttribute(name2) {
1312
+ return ARIA_PROPERTIES.some((element) => element === name2);
1313
+ }
1314
+ function getTagName(node) {
1315
+ if (node?.parent?.name) {
1316
+ return node.parent.name.name;
1317
+ }
1318
+ return null;
1319
+ }
1320
+ function tagNameHasDot(node) {
1321
+ return !!(node.parent?.name && node.parent.name.type === "JSXMemberExpression");
1322
+ }
1323
+ function getStandardName(name2, context) {
1324
+ if (has(DOM_ATTRIBUTE_NAMES, name2)) {
1325
+ return DOM_ATTRIBUTE_NAMES[name2];
1326
+ }
1327
+ if (has(SVGDOM_ATTRIBUTE_NAMES, name2)) {
1328
+ return SVGDOM_ATTRIBUTE_NAMES[name2];
1329
+ }
1330
+ const names = getDOMPropertyNames();
1331
+ return names.find((element) => element.toLowerCase() === name2.toLowerCase());
1332
+ }
1333
+ var messages = {
1334
+ dataLowercaseRequired: "React does not recognize data-* props with uppercase characters on a DOM element. Found '{{name}}', use '{{lowerCaseName}}' instead",
1335
+ invalidPropOnTag: "Invalid property '{{name}}' found on tag '{{tagName}}', but it is only allowed on: {{allowedTags}}",
1336
+ unknownProp: "Unknown property '{{name}}' found",
1337
+ unknownPropWithStandardName: "Unknown property '{{name}}' found, use '{{standardName}}' instead"
1338
+ };
1339
+ var no_unknown_property_default = createRule({
1340
+ meta: {
1341
+ docs: {
1342
+ description: "disallow usage of unknown DOM property"
1343
+ },
1344
+ fixable: "code",
1345
+ messages,
1346
+ schema: [{
1347
+ type: "object",
1348
+ additionalProperties: false,
1349
+ properties: {
1350
+ ignore: {
1351
+ type: "array",
1352
+ items: {
1353
+ type: "string"
1354
+ }
1355
+ },
1356
+ requireDataLowercase: {
1357
+ type: "boolean",
1358
+ default: false
1359
+ }
1360
+ }
1361
+ }]
1362
+ },
1363
+ name: RULE_NAME10,
1364
+ create(context) {
1365
+ function getIgnoreConfig() {
1366
+ return context.options[0]?.ignore || DEFAULTS.ignore;
1367
+ }
1368
+ function getRequireDataLowercase() {
1369
+ return context.options[0] && typeof context.options[0].requireDataLowercase !== "undefined" ? !!context.options[0].requireDataLowercase : DEFAULTS.requireDataLowercase;
1370
+ }
1371
+ return {
1372
+ JSXAttribute(node) {
1373
+ const ignoreNames = getIgnoreConfig();
1374
+ const actualName = getText(context, node.name);
1375
+ if (ignoreNames.indexOf(actualName) >= 0) {
1376
+ return;
1377
+ }
1378
+ const name2 = normalizeAttributeCase(actualName);
1379
+ if (tagNameHasDot(node)) {
1380
+ return;
1381
+ }
1382
+ if (isValidDataAttribute(name2)) {
1383
+ if (getRequireDataLowercase() && hasUpperCaseCharacter(name2)) {
1384
+ report(context, messages.dataLowercaseRequired, "dataLowercaseRequired", {
1385
+ node,
1386
+ data: {
1387
+ name: actualName,
1388
+ lowerCaseName: actualName.toLowerCase()
1389
+ }
1390
+ });
1391
+ }
1392
+ return;
1393
+ }
1394
+ if (isValidAriaAttribute(name2)) return;
1395
+ const tagName = getTagName(node);
1396
+ if (tagName === "fbt" || tagName === "fbs") return;
1397
+ if (!isValidHTMLTagInJSX(node)) return;
1398
+ const allowedTags = has(ATTRIBUTE_TAGS_MAP, name2) ? ATTRIBUTE_TAGS_MAP[name2] : null;
1399
+ if (tagName && allowedTags) {
1400
+ if (allowedTags.indexOf(tagName) === -1) {
1401
+ report(context, messages.invalidPropOnTag, "invalidPropOnTag", {
1402
+ node,
1403
+ data: {
1404
+ name: actualName,
1405
+ allowedTags: allowedTags.join(", "),
1406
+ tagName
1407
+ }
1408
+ });
1409
+ }
1410
+ return;
1411
+ }
1412
+ const standardName = getStandardName(name2);
1413
+ const hasStandardNameButIsNotUsed = standardName && standardName !== name2;
1414
+ const usesStandardName = standardName && standardName === name2;
1415
+ if (usesStandardName) {
1416
+ return;
1417
+ }
1418
+ if (hasStandardNameButIsNotUsed) {
1419
+ report(context, messages.unknownPropWithStandardName, "unknownPropWithStandardName", {
1420
+ node,
1421
+ data: {
1422
+ name: actualName,
1423
+ standardName
1424
+ },
1425
+ fix(fixer) {
1426
+ return fixer.replaceText(node.name, standardName);
1427
+ }
1428
+ });
1429
+ return;
1430
+ }
1431
+ report(context, messages.unknownProp, "unknownProp", {
1432
+ node,
1433
+ data: {
1434
+ name: actualName
1435
+ }
1436
+ });
1437
+ }
1438
+ };
1439
+ },
1440
+ defaultOptions: []
1441
+ });
1442
+ function has(obj, key) {
1443
+ return Object.hasOwn(obj, key);
1444
+ }
1445
+ function getText(context, node) {
1446
+ return context.sourceCode.getText(node);
1447
+ }
1448
+ function report(context, message, messageId, data) {
1449
+ context.report({
1450
+ messageId,
1451
+ ...data
1452
+ });
1453
+ }
1454
+ var RULE_NAME11 = "no-unsafe-iframe-sandbox";
409
1455
  var unsafeCombinations = [
410
1456
  ["allow-scripts", "allow-same-origin"]
411
1457
  // ...
@@ -421,7 +1467,7 @@ var no_unsafe_iframe_sandbox_default = createRule({
421
1467
  },
422
1468
  schema: []
423
1469
  },
424
- name: RULE_NAME10,
1470
+ name: RULE_NAME11,
425
1471
  create(context) {
426
1472
  const { components, polymorphicPropName } = shared.normalizeSettings(shared.decodeSettings(context.settings));
427
1473
  return {
@@ -454,7 +1500,7 @@ var no_unsafe_iframe_sandbox_default = createRule({
454
1500
  },
455
1501
  defaultOptions: []
456
1502
  });
457
- var RULE_NAME11 = "no-unsafe-target-blank";
1503
+ var RULE_NAME12 = "no-unsafe-target-blank";
458
1504
  function isExternalLinkLike(value) {
459
1505
  return value.startsWith("https://") || /^(?:\w+:|\/\/)/u.test(value);
460
1506
  }
@@ -472,7 +1518,7 @@ var no_unsafe_target_blank_default = createRule({
472
1518
  },
473
1519
  schema: []
474
1520
  },
475
- name: RULE_NAME11,
1521
+ name: RULE_NAME12,
476
1522
  create(context) {
477
1523
  const settings = shared.normalizeSettings(shared.decodeSettings(context.settings));
478
1524
  const polymorphicPropName = settings.polymorphicPropName;
@@ -571,6 +1617,7 @@ var src_default = {
571
1617
  "no-namespace": no_namespace_default,
572
1618
  "no-render-return-value": no_render_return_value_default,
573
1619
  "no-script-url": no_script_url_default,
1620
+ "no-unknown-property": no_unknown_property_default,
574
1621
  "no-unsafe-iframe-sandbox": no_unsafe_iframe_sandbox_default,
575
1622
  "no-unsafe-target-blank": no_unsafe_target_blank_default
576
1623
  },