@@ -81,6 +81,9 @@ function foo(x: any) {
8181 errors : [
8282 {
8383 messageId : 'unsafeMemberExpression' ,
84+ line : 3 ,
85+ column : 5 ,
86+ endColumn : 6 ,
8487 data : {
8588 property : '.a' ,
8689 } ,
@@ -96,6 +99,9 @@ function foo(x: any) {
9699 errors : [
97100 {
98101 messageId : 'unsafeMemberExpression' ,
102+ line : 3 ,
103+ column : 5 ,
104+ endColumn : 6 ,
99105 data : {
100106 property : '.a' ,
101107 } ,
@@ -111,6 +117,9 @@ function foo(x: { a: any }) {
111117 errors : [
112118 {
113119 messageId : 'unsafeMemberExpression' ,
120+ line : 3 ,
121+ column : 7 ,
122+ endColumn : 8 ,
114123 data : {
115124 property : '.b' ,
116125 } ,
@@ -126,6 +135,9 @@ function foo(x: any) {
126135 errors : [
127136 {
128137 messageId : 'unsafeMemberExpression' ,
138+ line : 3 ,
139+ column : 5 ,
140+ endColumn : 8 ,
129141 data : {
130142 property : "['a']" ,
131143 } ,
@@ -141,6 +153,9 @@ function foo(x: any) {
141153 errors : [
142154 {
143155 messageId : 'unsafeMemberExpression' ,
156+ line : 3 ,
157+ column : 5 ,
158+ endColumn : 8 ,
144159 data : {
145160 property : "['a']" ,
146161 } ,
@@ -156,6 +171,9 @@ function foo(x: { a: number }, y: any) {
156171 errors : [
157172 {
158173 messageId : 'unsafeComputedMemberAccess' ,
174+ line : 3 ,
175+ column : 5 ,
176+ endColumn : 6 ,
159177 data : {
160178 property : '[y]' ,
161179 } ,
@@ -171,6 +189,9 @@ function foo(x?: { a: number }, y: any) {
171189 errors : [
172190 {
173191 messageId : 'unsafeComputedMemberAccess' ,
192+ line : 3 ,
193+ column : 7 ,
194+ endColumn : 8 ,
174195 data : {
175196 property : '[y]' ,
176197 } ,
@@ -186,6 +207,9 @@ function foo(x: { a: number }, y: any) {
186207 errors : [
187208 {
188209 messageId : 'unsafeComputedMemberAccess' ,
210+ line : 3 ,
211+ column : 6 ,
212+ endColumn : 12 ,
189213 data : {
190214 property : '[y += 1]' ,
191215 } ,
@@ -201,6 +225,9 @@ function foo(x: { a: number }, y: any) {
201225 errors : [
202226 {
203227 messageId : 'unsafeComputedMemberAccess' ,
228+ line : 3 ,
229+ column : 5 ,
230+ endColumn : 13 ,
204231 data : {
205232 property : '[1 as any]' ,
206233 } ,
@@ -216,6 +243,9 @@ function foo(x: { a: number }, y: any) {
216243 errors : [
217244 {
218245 messageId : 'unsafeComputedMemberAccess' ,
246+ line : 3 ,
247+ column : 5 ,
248+ endColumn : 8 ,
219249 data : {
220250 property : '[y()]' ,
221251 } ,
@@ -231,6 +261,9 @@ function foo(x: string[], y: any) {
231261 errors : [
232262 {
233263 messageId : 'unsafeComputedMemberAccess' ,
264+ line : 3 ,
265+ column : 5 ,
266+ endColumn : 6 ,
234267 data : {
235268 property : '[y]' ,
236269 } ,
@@ -260,22 +293,48 @@ const methods = {
260293 {
261294 messageId : 'unsafeThisMemberExpression' ,
262295 line : 4 ,
263- column : 12 ,
296+ column : 17 ,
264297 endColumn : 24 ,
265298 } ,
266299 {
267300 messageId : 'unsafeThisMemberExpression' ,
268301 line : 8 ,
269- column : 12 ,
270- endColumn : 31 ,
302+ column : 17 ,
303+ endColumn : 30 ,
271304 } ,
272305 {
273306 messageId : 'unsafeThisMemberExpression' ,
274307 line : 14 ,
275- column : 13 ,
308+ column : 19 ,
276309 endColumn : 26 ,
277310 } ,
278311 ] ,
279312 } ,
313+ {
314+ code : `
315+ class C {
316+ getObs$: any;
317+ getPopularDepartments(): void {
318+ this.getObs$.pipe().subscribe(res => {
319+ console.log(res);
320+ });
321+ }
322+ }
323+ ` ,
324+ errors : [
325+ {
326+ messageId : 'unsafeMemberExpression' ,
327+ line : 5 ,
328+ column : 18 ,
329+ endColumn : 22 ,
330+ } ,
331+ {
332+ messageId : 'unsafeMemberExpression' ,
333+ line : 5 ,
334+ column : 25 ,
335+ endColumn : 34 ,
336+ } ,
337+ ] ,
338+ } ,
280339 ] ,
281340} ) ;
0 commit comments