Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use the {} type to represent an empty object as representing any non-nullish value #64

Open
danielwiehl opened this issue Aug 27, 2021 · 0 comments

Comments

@danielwiehl
Copy link
Collaborator

Describe the bug

@typescript-eslint bans {} as type because it does not represent an empty object as most developers would expect, but "any non-nullish value" instead. As a workaround, we disabled the linting rule @typescript-eslint/ban-types to not report a violation for {} types.

Expected behavior

We do not use the {} type to represent an empty object and have re-enabled the linting rule @typescript-eslint/ban-types.

See the following links for more information:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant