Bug: RuleContext.parserPath should be string | undefined, not string #9475
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
utils
Playground Link
No response
Repro Code
ESLint Config
No response
tsconfig
No response
Expected Result
ESLint doesn't always know the
parserName
provided in rule contexts:https://github.com/eslint/eslint/blob/7c78ad9d9f896354d557f24e2d37710cf79a27bf/lib/linter/linter.js#L978
https://github.com/eslint/eslint/blob/7c78ad9d9f896354d557f24e2d37710cf79a27bf/lib/linter/linter.js#L1920-L1924
Actual Result
...but we define it as:
typescript-eslint/packages/utils/src/ts-eslint/Rule.ts
Lines 196 to 199 in c322099
And now we have this unfortunate stdout bug - note the
Parser: undefined
:Additional Info
I'll file an ESLint issue soon asking that ESLint tries to glean that parser name if possible. The
espree
module exports aname = 'espree'
that can be useful.Edit: eslint/eslint#18645
Versions
@typescript-eslint/eslint-plugin
7.15.0
@typescript-eslint/parser
7.15.0
@typescript-eslint/utils
7.15.0
ESLint
8.6.0
💖
The text was updated successfully, but these errors were encountered: