Skip to content

Commit

Permalink
fix: override type-aware rules properly
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Sep 19, 2024
1 parent c32b3ab commit 3da437d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/configs/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export async function typescript(
componentExts = [],
isInEditor = false,
overrides = {},
overridesTypeAware = {},
parserOptions = {},
type = 'app',
} = options;
Expand Down Expand Up @@ -226,8 +227,8 @@ export async function typescript(
ignores: ignoresTypeAware,
name: 'rotki/typescript/rules-type-aware',
rules: {
...tsconfigPath ? typeAwareRules : {},
...overrides,
...typeAwareRules,
...overridesTypeAware,
},
}]
: [],
Expand Down
5 changes: 5 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ export interface OptionsTypeScriptWithTypes {
* @see https://typescript-eslint.io/linting/typed-linting/
*/
tsconfigPath?: string;

/**
* Override type-aware rules.
*/
overridesTypeAware?: TypedFlatConfigItem['rules'];
}

export interface OptionsHasTypeScript {
Expand Down

0 comments on commit 3da437d

Please sign in to comment.