-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: default to parse all JSDoc and provide options to configure it #7999
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: default to parse all JSDoc and provide options to configure it #7999
Conversation
Thanks for the PR, @bradzacher! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
packages/typescript-estree/src/parseSettings/createParseSettings.ts
Outdated
Show resolved
Hide resolved
@@ -9,7 +9,9 @@ const createStubFileWatcher = (): ts.FileWatcher => ({ | |||
|
|||
export type TypeScriptProjectService = ts.server.ProjectService; | |||
|
|||
export function createProjectService(): TypeScriptProjectService { | |||
export function createProjectService( | |||
jsDocParsingMode?: ts.JSDocParsingMode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preemptive check; IIRC this is public. Should this be some sort of options bag rather than a parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah this isn't public - we don't export it from either index.ts
or use-at-your-own-risk.ts
.
Thanks for mentioning, no problem for us. |
This has been released in an out-of-band patch release https://github.com/typescript-eslint/typescript-eslint/releases/tag/v6.13.1 |
Overview
In hindsight #7997 was sadly a breaking change.
There's a number of usecases that do rely on accessing JSDoc on the TS AST (eg
eslint-plugin-deprecation
).This PR amends this change so that:
all
(which was the pre-5.3 behaviour) for type-aware linting.none
for non-type-aware-linting.none
by default for this case should provide all non-type-aware-linting users with a free perf boost.all
- but I don't think we'll see it.In a future we can consider switching the type-aware default to
'type-info'
and force users to pass the config if and only if they use a rule that requires'all'
.FYI @jakebailey / @fisker