standard / ts-standard

Typescript style guide, linter, and formatter using StandardJS
https://www.npmjs.com/package/ts-standard
MIT License
464 stars 36 forks source link

react/require-render-return fires for non-react code #287

Open tonioloewald opened 1 year ago

tonioloewald commented 1 year ago

What version of this package are you using? 12.0.1

What operating system, Node.js, and npm version? macOS, 16.18.1, 9.6.0

What happened? When I lint code that creates a custom element by subclassing a class named Component, I get an error because the subclass's render method (which is declared as void) doesn't return something. It shouldn't return anything. TypeScript is not React and in any event non-React code shouldn't be assumed to be React code.

What did you expect to happen? This code is fine. No errors should be thrown.

Are you willing to submit a pull request to fix this bug? No.