Closed quantuminformation closed 7 years ago
Sounds like an issue for the rules repo?
Which one is that?
Probably https://palantir.github.io/tslint/rules/no-empty/ - you can use a comment for now. Not sure what the behaviour compared to ESLint is here.
Well I doubt there is one, since there is no abstract class. Would be tricky to implement a layer on top just for TS too I think.
I realise. You could compare the configuration that exists, there's likely a case for finer grain configuration in the rules. From what I can tell, ESLint separates it into block and function checks (http://eslint.org/docs/rules/no-empty and http://eslint.org/docs/rules/no-empty-function). Maybe it's something to propose into one of the rule repos? Unless you have a suggestion for this repo, I'll close it in favour of an issue in either ESLint rules or TSLint. Feel free to link it back here for context 😄
I'd say make an issue in https://github.com/buzinas/tslint-eslint-rules to be more specific and similar to ESLint's built-in rules and make a second issue in TSLint itself - it seems like an oversight to not support abstract methods (via configuration or by default).
Also, there weren't any line numbers so I couldn't really tell if some code was hidden or not (you should consider using markdown code blocks to make it easier). But I think you may have been using the method incorrectly too - why not mark the method as abstract so it doesn't need a body at all? An abstract class can still have normal or abstract methods.
Thanks, just using abstract draw (canvas: CanvasRenderingContext2D)
fixes it for me!