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(visitor-keys): fix visitor keys order#11279

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

Open
overlookmotel wants to merge1 commit intotypescript-eslint:main
base:main
Choose a base branch
Loading
fromoverlookmotel:fix-visitor-keys-order

Conversation

overlookmotel
Copy link
Contributor

@overlookmoteloverlookmotel commentedJun 6, 2025
edited
Loading

PR Checklist

Overview

As discussed in#11276, visitor keys are not in source code order for 5 types:

  • TSImportType
  • TSIndexedAccessType
  • TSMethodSignature
  • TSPropertySignature
  • TSTypePredicate

This PR fixes that by altering the order of keys inAdditionalKeys.

The changes to test snapshots are incidental details.

It appears that visitation happening in source code order is not covered by tests, but no lint rules are impacted by this change. If required, I would be happy to add tests, if someone can point me to where to put them.

FYI:Oxc's JS-side AST for TS files now aligns exactly with TS-ESLint parser's. The discrepancies in visitation order addressed in this PR were discovered during the work on alignment to get there. Our conformance testing ensures that visitor keys (after the changes in this PR) result in visitation in source code order for all AST types, for all Test262 and TypeScript test cases.

Except...ExportSpecifier wherelocal andexported are visited in wrong order. However, TS-ESLint inherits that problem fromeslint-visitor-keys.eslint/js#655 hopes to address that one upstream.

Anyway, my point is: I imagine it'd be preferable for TS-ESLint to have your own test coverage for visitation order. However, if you choose to believe me, I can tell you that the types changed in this PR +ExportSpecifier are the only places where there is a problem.

kirkwaiblinger reacted with thumbs up emoji
@typescript-eslint
Copy link
Contributor

Thanks for the PR,@overlookmotel!

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 commentedJun 6, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitb5f8186
🔍 Latest deploy loghttps://app.netlify.com/projects/typescript-eslint/deploys/6842c8fd2f2cab000894ae6e
😎 Deploy Previewhttps://deploy-preview-11279--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 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (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 project configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedJun 6, 2025
edited
Loading

View yourCI Pipeline Execution ↗ for commitb5f8186.

CommandStatusDurationResult
nx test eslint-plugin --coverage=false✅ Succeeded5m 5sView ↗
nx run-many -t typecheck✅ Succeeded1m 58sView ↗
nx test typescript-estree --coverage=false✅ Succeeded18sView ↗
nx run-many -t lint✅ Succeeded11sView ↗
nx test eslint-plugin-internal --coverage=false✅ Succeeded6sView ↗
nx run integration-tests:test✅ Succeeded<1sView ↗
nx run generate-configs✅ Succeeded8sView ↗
nx run types:build✅ Succeeded<1sView ↗
Additional runs (27)✅ Succeeded...View ↗

☁️Nx Cloud last updated this comment at2025-06-06 11:05:59 UTC

@codecovCodecov
Copy link

codecovbot commentedJun 6, 2025
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.91%. Comparing base(0f5c59c) to head(b5f8186).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@##             main   #11279   +/-   ##=======================================  Coverage   90.91%   90.91%           =======================================  Files         501      501             Lines       50869    50869             Branches     8382     8382           =======================================  Hits        46248    46248             Misses       4606     4606             Partials       15       15
FlagCoverage Δ
unittest90.91% <100.00%> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.

Files with missing linesCoverage Δ
packages/visitor-keys/src/visitor-keys.ts100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@kirkwaiblingerkirkwaiblinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for sending this!

RE the test coverage - I think let's get this merged and I'd invite you to file a followup issue for the test coverage question.

@kirkwaiblingerkirkwaiblinger added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelJun 6, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kirkwaiblingerkirkwaiblingerkirkwaiblinger approved these changes

Assignees
No one assigned
Labels
1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: Visitor keys for 5 types are not in source order
2 participants
@overlookmotel@kirkwaiblinger

[8]ページ先頭

©2009-2025 Movatter.jp