@@ -732,12 +732,18 @@ ruleTester.run('no-typos', rule, {
732
732
} , {
733
733
code : `
734
734
class Hello extends React.Component {
735
+ static GetDerivedStateFromProps() { }
735
736
ComponentWillMount() { }
737
+ UNSAFE_ComponentWillMount() { }
736
738
ComponentDidMount() { }
737
739
ComponentWillReceiveProps() { }
740
+ UNSAFE_ComponentWillReceiveProps() { }
738
741
ShouldComponentUpdate() { }
739
742
ComponentWillUpdate() { }
743
+ UNSAFE_ComponentWillUpdate() { }
744
+ GetSnapshotBeforeUpdate() { }
740
745
ComponentDidUpdate() { }
746
+ ComponentDidCatch() { }
741
747
ComponentWillUnmount() { }
742
748
render() {
743
749
return <div>Hello {this.props.name}</div>;
@@ -766,16 +772,40 @@ ruleTester.run('no-typos', rule, {
766
772
} , {
767
773
message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
768
774
type : 'MethodDefinition'
775
+ } , {
776
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
777
+ type : 'MethodDefinition'
778
+ } , {
779
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
780
+ type : 'MethodDefinition'
781
+ } , {
782
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
783
+ type : 'MethodDefinition'
784
+ } , {
785
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
786
+ type : 'MethodDefinition'
787
+ } , {
788
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
789
+ type : 'MethodDefinition'
790
+ } , {
791
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
792
+ type : 'MethodDefinition'
769
793
} ]
770
794
} , {
771
795
code : `
772
796
class Hello extends React.Component {
797
+ static Getderivedstatefromprops() { }
773
798
Componentwillmount() { }
799
+ UNSAFE_Componentwillmount() { }
774
800
Componentdidmount() { }
775
801
Componentwillreceiveprops() { }
802
+ UNSAFE_Componentwillreceiveprops() { }
776
803
Shouldcomponentupdate() { }
777
804
Componentwillupdate() { }
805
+ UNSAFE_Componentwillupdate() { }
806
+ Getsnapshotbeforeupdate() { }
778
807
Componentdidupdate() { }
808
+ Componentdidcatch() { }
779
809
Componentwillunmount() { }
780
810
Render() {
781
811
return <div>Hello {this.props.name}</div>;
@@ -807,16 +837,40 @@ ruleTester.run('no-typos', rule, {
807
837
} , {
808
838
message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
809
839
type : 'MethodDefinition'
840
+ } , {
841
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
842
+ type : 'MethodDefinition'
843
+ } , {
844
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
845
+ type : 'MethodDefinition'
846
+ } , {
847
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
848
+ type : 'MethodDefinition'
849
+ } , {
850
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
851
+ type : 'MethodDefinition'
852
+ } , {
853
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
854
+ type : 'MethodDefinition'
855
+ } , {
856
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
857
+ type : 'MethodDefinition'
810
858
} ]
811
859
} , {
812
860
code : `
813
861
class Hello extends React.Component {
862
+ static getderivedstatefromprops() { }
814
863
componentwillmount() { }
864
+ unsafe_componentwillmount() { }
815
865
componentdidmount() { }
816
866
componentwillreceiveprops() { }
867
+ unsafe_componentwillreceiveprops() { }
817
868
shouldcomponentupdate() { }
818
869
componentwillupdate() { }
870
+ unsafe_componentwillupdate() { }
871
+ getsnapshotbeforeupdate() { }
819
872
componentdidupdate() { }
873
+ componentdidcatch() { }
820
874
componentwillunmount() { }
821
875
render() {
822
876
return <div>Hello {this.props.name}</div>;
@@ -845,6 +899,24 @@ ruleTester.run('no-typos', rule, {
845
899
} , {
846
900
message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
847
901
type : 'MethodDefinition'
902
+ } , {
903
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
904
+ type : 'MethodDefinition'
905
+ } , {
906
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
907
+ type : 'MethodDefinition'
908
+ } , {
909
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
910
+ type : 'MethodDefinition'
911
+ } , {
912
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
913
+ type : 'MethodDefinition'
914
+ } , {
915
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
916
+ type : 'MethodDefinition'
917
+ } , {
918
+ message : ERROR_MESSAGE_LIFECYCLE_METHOD ,
919
+ type : 'MethodDefinition'
848
920
} ]
849
921
} , {
850
922
code : `
0 commit comments