Skip to content

Commit

Permalink
Merge pull request #134 from hatena/fix-types
Browse files Browse the repository at this point in the history
型定義の更新漏れを修正
  • Loading branch information
susisu authored Sep 5, 2024
2 parents d221276 + 8077a25 commit 0ac8281
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import { Linter } from 'eslint';
import { ParserOptions } from '@typescript-eslint/parser';
import { Config, ConfigWithExtends } from 'typescript-eslint';

type ConfigOptions = Readonly<
Partial<{
/**
* TypeScript の設定ファイル (languageOptions.parserOptions.project)
* デフォルト: ./tsconfig.json
* TypeScript の設定ファイル (https://typescript-eslint.io/packages/parser#project)
* デフォルト: true (lint 対象のファイルに最も近い tsconfig.json を利用する)
*/
tsProject: boolean | string | string[] | undefined;
tsProject: ParserOptions['project'];
/**
* TypeScript のプロジェクトの設定 (https://typescript-eslint.io/packages/parser#projectservice)
* デフォルト: false (無効)
*/
tsProjectService: ParserOptions['projectService'];
/**
* tsconfig.json の探索先のルートディレクトリ (https://typescript-eslint.io/packages/parser#tsconfigrootdir)
* デフォルト: undefined
*/
tsconfigRootDir: ParserOptions['tsconfigRootDir'];
/**
* React を使用するか. true の場合, React に関連する設定を有効にする
* デフォルト: false
Expand All @@ -26,7 +37,7 @@ type ConfigOptions = Readonly<
* @param configs カスタム設定の配列
* @returns 設定の配列
*/
declare function config(options?: ConfigOptions, configs?: readonly Linter.Config[]): Linter.Config[];
declare function config(options?: ConfigOptions, configs?: readonly ConfigWithExtends[]): Config[];

export { type ConfigOptions, config };
export default config;

0 comments on commit 0ac8281

Please sign in to comment.