Skip to content

Commit

Permalink
fix(eslint-plugin): [ban-types] update message to suggest object in…
Browse files Browse the repository at this point in the history
…stead of `Record<string, unknown>` (#6079)
  • Loading branch information
kmin-jeong committed Dec 7, 2022
1 parent 8a91cbd commit d91a5fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/eslint-plugin/src/rules/ban-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ const defaultTypes: Types = {
Object: {
message: [
'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.',
'- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
'- If you want a type meaning "any object", you probably want `object` instead.',
'- If you want a type meaning "any value", you probably want `unknown` instead.',
].join('\n'),
},
'{}': {
message: [
'`{}` actually means "any non-nullish value".',
'- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
'- If you want a type meaning "any object", you probably want `object` instead.',
'- If you want a type meaning "any value", you probably want `unknown` instead.',
'- If you want a type meaning "empty object", you probably want `Record<string, never>` instead.',
].join('\n'),
Expand Down

0 comments on commit d91a5fc

Please sign in to comment.