⬅️ Back to Table of Contents
📄 types/src/parser-options
📊 Analysis Summary
| Metric |
Count |
| 📦 Imports |
2 |
| 📐 Interfaces |
2 |
| 📑 Type Aliases |
6 |
📚 Table of Contents
🛠️ File Location:
📂 packages/types/src/parser-options.ts
📦 Imports
| Name |
Source |
Program |
typescript |
Lib |
./lib |
Interfaces
ProjectServiceOptions
Interface Code
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.
* @default 'tsconfig.json'
*/
defaultProject?: string;
/**
* Whether to allow TypeScript plugins as configured in the TSConfig.
*/
loadTypeScriptPlugins?: boolean;
/**
* 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;
}
Properties
| Name |
Type |
Optional |
Description |
allowDefaultProject |
string[] |
✓ |
not shown |
defaultProject |
string |
✓ |
not shown |
loadTypeScriptPlugins |
boolean |
✓ |
not shown |
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_L... |
number |
✓ |
not shown |
ParserOptions
Interface Code
export interface ParserOptions {
[additionalProperties: string]: unknown;
cacheLifetime?: {
glob?: CacheDurationSeconds;
};
// typescript-estree specific
debugLevel?: DebugLevel;
ecmaFeatures?:
| {
[key: string]: unknown;
globalReturn?: boolean | undefined;
jsx?: boolean | undefined;
}
| undefined;
ecmaVersion?: EcmaVersion;
// use emitDecoratorMetadata without specifying parserOptions.project
emitDecoratorMetadata?: boolean;
errorOnTypeScriptSyntacticAndSemanticIssues?: boolean;
errorOnUnknownASTType?: boolean;
// use experimentalDecorators without specifying parserOptions.project
experimentalDecorators?: boolean;
extraFileExtensions?: string[];
filePath?: string;
// use isolatedDeclarations without specifying parserOptions.project
isolatedDeclarations?: boolean;
jsDocParsingMode?: JSDocParsingMode;
jsxFragmentName?: string | null;
// scope-manager specific
jsxPragma?: string | null;
lib?: Lib[];
programs?: Program[] | null;
project?: boolean | string | string[] | null;
projectFolderIgnoreList?: string[];
projectService?: boolean | ProjectServiceOptions;
range?: boolean;
sourceType?: SourceType | undefined;
tokens?: boolean;
tsconfigRootDir?: string;
/**
* Controls how the parser reacts when run with a TypeScript version that is
* not officially supported by typescript-eslint.
* - `'warn'` (default): log a warning to the console.
* - `'error'`: throw, causing the lint run to fail. Useful in CI to prevent
* unsupported TypeScript versions from being merged unnoticed.
* - `'ignore'`: do nothing.
*/
onUnsupportedTypeScriptVersion?: 'error' | 'ignore' | 'warn';
/**
* @deprecated Use {@link onUnsupportedTypeScriptVersion} instead.
* `true` is equivalent to `'warn'` and `false` is equivalent to `'ignore'`.
*/
warnOnUnsupportedTypeScriptVersion?: boolean;
}
Properties
| Name |
Type |
Optional |
Description |
cacheLifetime |
{ glob?: CacheDurationSeconds; } |
✓ |
not shown |
debugLevel |
DebugLevel |
✓ |
not shown |
ecmaFeatures |
\| { [key: string]: unknown; globalReturn?: boolean \| undefined; jsx?: boole... |
✓ |
not shown |
ecmaVersion |
EcmaVersion |
✓ |
not shown |
emitDecoratorMetadata |
boolean |
✓ |
not shown |
errorOnTypeScriptSyntacticAndSemanticIssues |
boolean |
✓ |
not shown |
errorOnUnknownASTType |
boolean |
✓ |
not shown |
experimentalDecorators |
boolean |
✓ |
not shown |
extraFileExtensions |
string[] |
✓ |
not shown |
filePath |
string |
✓ |
not shown |
isolatedDeclarations |
boolean |
✓ |
not shown |
jsDocParsingMode |
JSDocParsingMode |
✓ |
not shown |
jsxFragmentName |
string \| null |
✓ |
not shown |
jsxPragma |
string \| null |
✓ |
not shown |
lib |
Lib[] |
✓ |
not shown |
programs |
Program[] \| null |
✓ |
not shown |
project |
boolean \| string \| string[] \| null |
✓ |
not shown |
projectFolderIgnoreList |
string[] |
✓ |
not shown |
projectService |
boolean \| ProjectServiceOptions |
✓ |
not shown |
range |
boolean |
✓ |
not shown |
sourceType |
SourceType \| undefined |
✓ |
not shown |
tokens |
boolean |
✓ |
not shown |
tsconfigRootDir |
string |
✓ |
not shown |
onUnsupportedTypeScriptVersion |
'error' \| 'ignore' \| 'warn' |
✓ |
not shown |
warnOnUnsupportedTypeScriptVersion |
boolean |
✓ |
not shown |
Type Aliases
DebugLevel
type DebugLevel = boolean | ('eslint' | 'typescript' | 'typescript-eslint')[];
CacheDurationSeconds
type CacheDurationSeconds = number | 'Infinity';
EcmaVersion
type EcmaVersion = | 3
| 5
| 6
| 7
| 8
| 9
| 10
| 11
| 12
| 13
| 14
| 15
| 16
| 17
| 2015
| 2016
| 2017
| 2018
| 2019
| 2020
| 2021
| 2022
| 2023
| 2024
| 2025
| 2026
| 'latest'
| undefined;
SourceTypeClassic
type SourceTypeClassic = 'module' | 'script';
SourceType
type SourceType = 'commonjs' | SourceTypeClassic;
JSDocParsingMode
type JSDocParsingMode = 'all' | 'none' | 'type-info';
Generated by Syntax Scribe