Skip to content

Commit

Permalink
fix: fix config types
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Jul 26, 2024
1 parent 56076c8 commit f5e37dc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/configs/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export const vue = defineConfig([
...(tseslint.config({
name: 'ntnyq/vue/ts',
files: [GLOB_VUE],
// TODO: Remove this when `typescript-eslint` is aligned with `eslint`
// @ts-expect-error - `typescript-eslint` is not aligned with eslint
extends: typescriptCore,
}) as TypedConfigItem[]),

Expand Down
1 change: 0 additions & 1 deletion src/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ declare module '@eslint/js'
declare module 'eslint-config-prettier'

declare module 'eslint-plugin-vue'
declare module 'eslint-plugin-unicorn'
declare module 'eslint-plugin-markdown'
declare module '@antfu/eslint-plugin-unused-imports'
declare module '@eslint-community/eslint-plugin-eslint-comments'
2 changes: 1 addition & 1 deletion src/types/eslint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type Rules = RuleOptions
/**
* Typed flat config item
*/
export type TypedConfigItem = Omit<Linter.FlatConfig<Linter.RulesRecord & Rules>, 'plugins'> & {
export type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, 'plugins'> & {
/**
* Most plugin are not properly typed
*/
Expand Down
2 changes: 1 addition & 1 deletion src/types/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type Awaitable<T> = T | Promise<T>
export type InteropModuleDefault<T> = T extends { default: infer U } ? U : T

export interface OverridesOptions<Rules = TypedConfigItem['rules']> {
files?: TypedConfigItem['rules']
files?: TypedConfigItem['files']
rules?: Rules
parserOptions?: ParserOptions
}

0 comments on commit f5e37dc

Please sign in to comment.