Skip to content

Commit

Permalink
fix: import correct flatconfig type
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed May 16, 2024
1 parent 360d003 commit b97879f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import type { Awaitable, FlatConfigItem, OptionsConfig, UserConfigItem } from '@antfu/eslint-config'
import type { Awaitable, TypedFlatConfigItem, OptionsConfig } from '@antfu/eslint-config'

Check failure on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Member 'OptionsConfig' of the import declaration should be sorted alphabetically
import antfu from '@antfu/eslint-config'
import antfuOptions from './rules/antfu'
import base from './rules/base'
import nuxt from './rules/nuxt'

const tresLintConfig = (
options: OptionsConfig & FlatConfigItem = {},
...configs: Awaitable<UserConfigItem | UserConfigItem[]>[]
): Promise<UserConfigItem[]> => {
options: OptionsConfig & TypedFlatConfigItem = {},
...configs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]
): Promise<TypedFlatConfigItem[]> => {
return antfu(
// @antfu/eslint-config options, must be the first argument
{
...antfuOptions,
...options,
},
// Addtionals flat configs start from here
base as FlatConfigItem,
base as TypedFlatConfigItem,
...configs,
)
}
Expand Down

0 comments on commit b97879f

Please sign in to comment.