Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(types): allow ProjectServiceOptions for projectService#9318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletionpackages/types/src/parser-options.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,6 +36,31 @@ type SourceType = SourceTypeClassic | 'commonjs';

type JSDocParsingMode = 'all' | 'none' | 'type-info';

/**
* Granular options to configure the project service.
*/
interface ProjectServiceOptions {
/**
* Globs of files to allow running with the default project compiler options
* despite not being matched by the project service.
*/
allowDefaultProject?: string[];

/**
* Path to a TSConfig to use instead of TypeScript's default project configuration.
*/
defaultProject?: string;

/**
* The maximum number of files {@link allowDefaultProject} may match.
* Each file match slows down linting, so if you do need to use this, please
* file an informative issue on typescript-eslint explaining why - so we can
* help you avoid using it!
* @default 8
*/
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number;
}

// If you add publicly visible options here, make sure they're also documented in `docs/packages/Parser.mdx`
interface ParserOptions {
ecmaFeatures?:
Expand DownExpand Up@@ -67,7 +92,7 @@ interface ParserOptions {
programs?: Program[] | null;
project?: string[] | string | boolean | null;
projectFolderIgnoreList?: string[];
projectService?: boolean;
projectService?: boolean | ProjectServiceOptions;
range?: boolean;
sourceType?: SourceType | undefined;
tokens?: boolean;
Expand All@@ -86,5 +111,6 @@ export {
EcmaVersion,
JSDocParsingMode,
ParserOptions,
ProjectServiceOptions,
SourceType,
};
28 changes: 3 additions & 25 deletionspackages/typescript-estree/src/parser-options.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,11 +2,14 @@ import type {
CacheDurationSeconds,
DebugLevel,
JSDocParsingMode,
ProjectServiceOptions,
} from '@typescript-eslint/types';
import type * as ts from 'typescript';

import type { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree';

export { ProjectServiceOptions } from '@typescript-eslint/types';

//////////////////////////////////////////////////////////
// MAKE SURE THIS IS KEPT IN SYNC WITH THE WEBSITE DOCS //
//////////////////////////////////////////////////////////
Expand DownExpand Up@@ -101,31 +104,6 @@ interface ParseOptions {
suppressDeprecatedPropertyWarnings?: boolean;
}

/**
* Granular options to configure the project service.
*/
export interface ProjectServiceOptions {
/**
* Globs of files to allow running with the default project compiler options
* despite not being matched by the project service.
*/
allowDefaultProject?: string[];

/**
* Path to a TSConfig to use instead of TypeScript's default project configuration.
*/
defaultProject?: string;

/**
* The maximum number of files {@link allowDefaultProject} may match.
* Each file match slows down linting, so if you do need to use this, please
* file an informative issue on typescript-eslint explaining why - so we can
* help you avoid using it!
* @default 8
*/
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number;
}

interface ParseAndGenerateServicesOptions extends ParseOptions {
/**
* Granular control of the expiry lifetime of our internal caches.
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp