Skip to content

Instantly share code, notes, and snippets.

@bradzacher
Created August 30, 2021 17:11
Show Gist options
  • Save bradzacher/8b74ad4bdcd75f4c0ccdf855a2f0c03d to your computer and use it in GitHub Desktop.
Save bradzacher/8b74ad4bdcd75f4c0ccdf855a2f0c03d to your computer and use it in GitHub Desktop.
ban-types with `object` ban
const config = {
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"object": {
"message": [
'The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).',
'Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys.',
].join('\n'),
},
},
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment