📄 getParserServices.ts
¶
📊 Analysis Summary¶
Metric | Count |
---|---|
🔧 Functions | 2 |
📦 Imports | 3 |
📊 Variables & Constants | 3 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/utils/src/eslint-utils/getParserServices.ts
📦 Imports¶
Name | Source |
---|---|
ParserServices |
../ts-estree |
ParserServicesWithTypeInformation |
../ts-estree |
parserSeemsToBeTSESLint |
./parserSeemsToBeTSESLint |
Variables & Constants¶
Name | Type | Kind | Value | Exported |
---|---|---|---|---|
ERROR_MESSAGE_REQUIRES_PARSER_SERVICES |
"You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file. See https://typescript-eslint.io/getting-started/typed-linting for enabling linting with type information." |
const | "You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file. See https://typescript-eslint.io/getting-started/typed-linting for enabling linting with type information." |
✗ |
ERROR_MESSAGE_UNKNOWN_PARSER |
"Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward \"parserOptions.project\" to @typescript-eslint/parser." |
const | 'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.' |
✗ |
parser |
string |
const | context.parserPath || context.languageOptions.parser?.meta?.name |
✗ |
Functions¶
getParserServices(context: Readonly<TSESLint.RuleContext<MessageIds, Options>>): ParserServicesWithTypeInformation
¶
Code
-
JSDoc:
-
Parameters:
context: Readonly<TSESLint.RuleContext<MessageIds, Options>>
- Return Type:
ParserServicesWithTypeInformation
throwError(parser: string | undefined): never
¶
Code
- Parameters:
parser: string | undefined
- Return Type:
never
- Calls:
[ ERROR_MESSAGE_REQUIRES_PARSER_SERVICES,
Parser: ${parser || '(unknown)'}, !parserSeemsToBeTSESLint(parser) && ERROR_MESSAGE_UNKNOWN_PARSER, ].filter
parserSeemsToBeTSESLint (from ./parserSeemsToBeTSESLint)
messages.join