Skip to content

Commit

Permalink
Merge pull request #120 from kiskv/master
Browse files Browse the repository at this point in the history
fix(eslint): add ignore typescript generic type params
  • Loading branch information
voronin-ivan authored Jan 25, 2021
2 parents cd923dd + f7c1d35 commit 0114b82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ module.exports = {
],

// typescript
'@typescript-eslint/indent': ['warn', 4, { SwitchCase: 1 }],
'@typescript-eslint/indent': ['warn', 4, {
SwitchCase: 1,
ignoredNodes: ['TSTypeParameterInstantiation'],
},
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/array-type': [
Expand Down
7 changes: 7 additions & 0 deletions test/ts-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ class SuperCache<T> implements CacheHostGeneric<T> {
const cache = new SuperCache<number>();

addTypedObjectToCache(123, cache);

type PickedCacheHost = Required<
Pick<
CacheHostGeneric<string>,
'save'
>
>;

0 comments on commit 0114b82

Please sign in to comment.