β¬ οΈ Back to Table of Contents
π getParserServices¶
π Analysis Summary¶
| Metric | Count |
|---|---|
| π§ Functions | 2 |
| π¦ Imports | 3 |
| π Variables & Constants | 2 |
π 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_PARS... |
"You have used a rule which requires ... |
const | "You have used a rule which requires type information, but don't have parserO... |
β |
ERROR_MESSAGE_UNKNOWN_PARSER |
"Note: detected a parser other than @... |
const | 'Note: detected a parser other than @typescript-eslint/parser. Make sure the ... |
β |
Functions¶
getParserServices(context: Readonly<TSESLint.RuleContext<MessageIdβ¦): ParserServicesWithTypeInformation¶
Try to retrieve type-aware parser service from context. This will throw if it is not available.
Raw JSDoc
/**
* Try to retrieve type-aware parser service from context.
* This **_will_** throw if it is not available.
*/
Code
throwError(parser: string | undefined): never¶
Parameters:
parserstring | undefined
Returns: never
Calls:
[ ERROR_MESSAGE_REQUIRES_PARSER_SERVICES,Parser: ${parser || '(unknown)'}, !parserSeemsToBeTSESLint(parser) && ERROR_MESSAGE_UNKNOWN_PARSER, ].filterparserSeemsToBeTSESLint (from ./parserSeemsToBeTSESLint)messages.join
Code
Generated by Syntax Scribe