-
-
Save bradzacher/8b74ad4bdcd75f4c0ccdf855a2f0c03d to your computer and use it in GitHub Desktop.
ban-types with `object` ban
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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