Skip to content

Commit e0d5821

Browse files
Add a test to cover FunctionDeclaration type as a parent scope
1 parent 1a9d54c commit e0d5821

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/lib/rules/no-this-in-sfc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,5 +192,18 @@ ruleTester.run('no-this-in-sfc', rule, {
192192
return null;
193193
}`,
194194
errors: [{message: ERROR_MESSAGE}]
195+
}, {
196+
code: `
197+
class Foo {
198+
bar() {
199+
function Bar(){
200+
return () => {
201+
this.something();
202+
return null;
203+
}
204+
}
205+
}
206+
}`,
207+
errors: [{message: ERROR_MESSAGE}]
195208
}]
196209
});

0 commit comments

Comments
 (0)