Skip to content

Commit

Permalink
chore(eslint-config): fix type error in vitest config
Browse files Browse the repository at this point in the history
This commit addresses a TypeScript error in the vitest configuration file within the eslint-config package. The `vitestPlugin.configs.recommended` is now explicitly cast to `Linter.Config` to resolve the type mismatch. A comment has been added to explain that the `configs` property is loosely typed, necessitating this workaround.
  • Loading branch information
shorwood committed Dec 29, 2024
1 parent 2477a5a commit 1fd00a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/eslint-config/configs/vitest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import vitestPlugin from '@vitest/eslint-plugin'

export function vitest(): Linter.Config[] {
return [
vitestPlugin.configs.recommended,
// @ts-expect-error: the `configs` property is loosely typed.
vitestPlugin.configs.recommended as Linter.Config,
{
rules: {

Expand Down

0 comments on commit 1fd00a8

Please sign in to comment.