Bug: [ban-types] Should suggest object, not Record<string, never> #5947
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
enhancement
New feature or request
good first issue
Good for newcomers
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=4.8.4&jsx=true&sourceType=module&code=CYUwxgNghgTiAEEQBd4CsBc8CuA7A1rgPYDuuA3AFBKoC28AvPAN7wB0HAFGvFAM4sAvgEp4gqkA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6AIwEMnajTUMkRNGgB7aJHBgAviGlA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA
Repro Code
ESLint Config
tsconfig
No response
Expected Result
From @RyanCavanaugh in #5018:
From @bradzacher in #5018 (comment):
#21732 -> github.com/microsoft/TypeScript/pull/50666 has been shipped, so the major flaws mentioned should be gone now.
Proposal: let's suggest
object
:I'm unsure what to do about
{}
. On the one hand:On the other hand, people do mistake it for "any object". 🤔
Actual Result
Right now we still recommend:
Additional Info
Originally suggested by @RyanCavanaugh in #5018.
Versions
@typescript-eslint/eslint-plugin
5.42.1
@typescript-eslint/parser
5.42.1
TypeScript
4.8.4
ESLint
8.15.0
node
web
The text was updated successfully, but these errors were encountered: