Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

bradzacher
Copy link
Member

@bradzacherbradzacher commentedNov 28, 2023
edited
Loading

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 (egeslint-plugin-deprecation).

This PR amends this change so that:

  • we accept the setting via parser options so it's user-configurable.
  • we default JSDoc parsing toall (which was the pre-5.3 behaviour) for type-aware linting.
  • we default JSDoc parsing tonone for non-type-aware-linting.
    • Setting this tonone by default for this case should provide all non-type-aware-linting users with a free perf boost.
    • This istechnically a breaking change - but the scope should be zero.
    • The only usecase this impacts is "accessing JSDoc from the TS AST when not using type-aware linting".
    • This usecase is possible - but I don't think it's something anyone would ever do as this would only give you JSDoc for the current file. Most single-file rules assume there's no TS AST.
    • If we do encounter a breakage we can revert this back toall - 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

fisker reacted with thumbs up emoji
@bradzacherbradzacher added the bugSomething isn't working labelNov 28, 2023
@typescript-eslint
Copy link
Contributor

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 onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedNov 28, 2023
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit70ecbb6
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/65653b753f2a6c0008ff31c0
😎 Deploy Previewhttps://deploy-preview-7999--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to yourNetlify site configuration.

@@ -9,7 +9,9 @@ const createStubFileWatcher = (): ts.FileWatcher => ({

export type TypeScriptProjectService = ts.server.ProjectService;

export function createProjectService(): TypeScriptProjectService {
export function createProjectService(
jsDocParsingMode?: ts.JSDocParsingMode,
Copy link
Collaborator

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?

bradzacher reacted with thumbs up emoji
Copy link
MemberAuthor

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 eitherindex.ts oruse-at-your-own-risk.ts.

@fisker
Copy link
Contributor

Thanks for mentioning, no problem for us.

@bradzacherbradzacher merged commit779e13e intomainNov 28, 2023
@bradzacherbradzacher deleted the jsdoc-parse-style-proper-fix-thats-not-a-breaking-change branchNovember 28, 2023 09:25
@bradzacher
Copy link
MemberAuthor

This has been released in an out-of-band patch releasehttps://github.com/typescript-eslint/typescript-eslint/releases/tag/v6.13.1

fisker reacted with thumbs up emoji

@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsDec 6, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@jakebaileyjakebaileyjakebailey left review comments

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

Assignees
No one assigned
Labels
bugSomething isn't working
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@bradzacher@fisker@JoshuaKGoldberg@jakebailey

[8]ページ先頭

©2009-2025 Movatter.jp