@@ -30,6 +30,7 @@ ruleTester.run('no-static-typos', rule, {
30
30
'class First {' ,
31
31
' static PropTypes = {key: "myValue"};' ,
32
32
' static ContextTypes = {key: "myValue"};' ,
33
+ ' static ChildContextTypes = {key: "myValue"};' ,
33
34
' static DefaultProps = {key: "myValue"};' ,
34
35
'}'
35
36
] . join ( '\n' ) ,
@@ -40,6 +41,7 @@ ruleTester.run('no-static-typos', rule, {
40
41
'class First extends React.Component {' ,
41
42
' static propTypes = {key: "myValue"};' ,
42
43
' static contextTypes = {key: "myValue"};' ,
44
+ ' static childContextTypes = {key: "myValue"};' ,
43
45
' static defaultProps = {key: "myValue"};' ,
44
46
'}'
45
47
] . join ( '\n' ) ,
@@ -50,6 +52,7 @@ ruleTester.run('no-static-typos', rule, {
50
52
'class MyClass {' ,
51
53
' propTypes = {key: "myValue"};' ,
52
54
' contextTypes = {key: "myValue"};' ,
55
+ ' childContextTypes = {key: "myValue"};' ,
53
56
' defaultProps = {key: "myValue"};' ,
54
57
'}'
55
58
] . join ( '\n' ) ,
@@ -60,6 +63,7 @@ ruleTester.run('no-static-typos', rule, {
60
63
'class MyClass {' ,
61
64
' PropTypes = {key: "myValue"};' ,
62
65
' ContextTypes = {key: "myValue"};' ,
66
+ ' ChildContextTypes = {key: "myValue"};' ,
63
67
' DefaultProps = {key: "myValue"};' ,
64
68
'}'
65
69
] . join ( '\n' ) ,
@@ -70,6 +74,7 @@ ruleTester.run('no-static-typos', rule, {
70
74
'class MyClass {' ,
71
75
' proptypes = {key: "myValue"};' ,
72
76
' contexttypes = {key: "myValue"};' ,
77
+ ' childcontextypes = {key: "myValue"};' ,
73
78
' defaultprops = {key: "myValue"};' ,
74
79
'}'
75
80
] . join ( '\n' ) ,
@@ -80,6 +85,7 @@ ruleTester.run('no-static-typos', rule, {
80
85
'class MyClass {' ,
81
86
' static PropTypes() {};' ,
82
87
' static ContextTypes() {};' ,
88
+ ' static ChildContextTypes() {};' ,
83
89
' static DefaultProps() {};' ,
84
90
'}'
85
91
] . join ( '\n' ) ,
@@ -90,6 +96,7 @@ ruleTester.run('no-static-typos', rule, {
90
96
'class MyClass {' ,
91
97
' static proptypes() {};' ,
92
98
' static contexttypes() {};' ,
99
+ ' static childcontexttypes() {};' ,
93
100
' static defaultprops() {};' ,
94
101
'}'
95
102
] . join ( '\n' ) ,
@@ -133,6 +140,24 @@ ruleTester.run('no-static-typos', rule, {
133
140
parser : 'babel-eslint' ,
134
141
parserOptions : parserOptions ,
135
142
errors : [ { message : ERROR_MESSAGE } ]
143
+ } , {
144
+ code : [
145
+ 'class Component extends React.Component {' ,
146
+ ' static ChildContextTypes = {};' ,
147
+ '}'
148
+ ] . join ( '\n' ) ,
149
+ parser : 'babel-eslint' ,
150
+ parserOptions : parserOptions ,
151
+ errors : [ { message : ERROR_MESSAGE } ]
152
+ } , {
153
+ code : [
154
+ 'class Component extends React.Component {' ,
155
+ ' static childcontexttypes = {};' ,
156
+ '}'
157
+ ] . join ( '\n' ) ,
158
+ parser : 'babel-eslint' ,
159
+ parserOptions : parserOptions ,
160
+ errors : [ { message : ERROR_MESSAGE } ]
136
161
} , {
137
162
code : [
138
163
'class Component extends React.Component {' ,
0 commit comments