Skip to content

Commit

Permalink
fix(eslint-config): allow {} type
Browse files Browse the repository at this point in the history
  • Loading branch information
foray1010 committed Aug 26, 2022
1 parent 8f4681a commit 930a2fa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/eslint-config/presets/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,17 @@ module.exports = {
},
plugins: ['@typescript-eslint/eslint-plugin'],
rules: {
// extend existing rule
'@typescript-eslint/ban-types': [
'error',
{
types: {
// TypeScript team suggests to use `<T extends {}>` https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#unconstrained-generics-no-longer-assignable-to
'{}': false,
},
extendDefaults: true,
},
],
// separate type imports which allow certain optimizations within compilers
'@typescript-eslint/consistent-type-imports': [
'error',
Expand Down

0 comments on commit 930a2fa

Please sign in to comment.