When writing code using typescript, you can specify a type for "this" as part of a function declaration.
This isn't an actual parameter to the function, but is defined like one.
The fix in my fork above requires tests - I've tried to add them, but it requires switching the tests to use the typescript parser, etc, which was more time than I have available at present.
Describe the bug
When writing code using typescript, you can specify a type for "this" as part of a function declaration. This isn't an actual parameter to the function, but is defined like one.
(See https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function for details)
You can use this in a jasmine test suite to specify things like spies, etc that are assigned to "this" in a type safe way.
When using eslint-plugin-jasmine with code written using this style, no-suite-callback-args is raised as a false-positive.
To Reproduce
Have a test.spec.ts file like the following. You can see the outer "describe" block has "this" specified as a type.
Run eslint, and see the following error raised:
Expected behaviour
No linting issue raised with jasmine/no-suite-callback-args raised for a "this" specification.
Context