Skip to content

Commit

Permalink
feat(ban-types): remove autofixes for banned {} and Object types
Browse files Browse the repository at this point in the history
These were very rarely good fixes
  • Loading branch information
djcsdy committed Nov 19, 2022
1 parent 4f6f7c4 commit 4d802b4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,15 @@ const config: Linter.Config = {
'Do not use `Object`, it 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 value", you probably want `unknown` instead.'
].join("\n"),
fixWith: "Record<string, unknown>"
].join("\n")
},
"{}": {
message: [
'Do not use `{}`, it 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 value", you probably want `unknown` instead.',
'- If you want a type meaning "empty object", you probably want `Record<string, never>` instead.'
].join("\n"),
fixWith: "Record<string, never>"
].join("\n")
},
"Function": {
message: [
Expand Down

0 comments on commit 4d802b4

Please sign in to comment.