Skip to content

fix(ast-spec): narrow import attribute keys to identifiers and strings - #12879

Merged
bradzacher merged 1 commit into
typescript-eslint:mainfrom
camc314:codex/import-attribute-key
Sep 16, 2026
Merged

bradzacher merged 1 commit into
typescript-eslint:mainfrom
camc314:codex/import-attribute-key

Conversation

@camc314

@camc314 camc314 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

Overview

This changes the key part of #12874

Copilot AI lite review requested due to automatic review settings September 15, 2026 03:28
@typescript-eslint

Copy link
Copy Markdown
Contributor

Thanks for the PR, @camc314!

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.

@netlify

netlify Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 3f4a20e
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/6aaa2430b1dff60007546764
😎 Deploy Preview https://deploy-preview-12879--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: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@nx-cloud

nx-cloud Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 3f4a20e

Command Status Duration Result
nx test scope-manager -u ✅ Succeeded 2s View ↗
nx run scope-manager:clean-fixtures ✅ Succeeded <1s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 3s View ↗
nx test ast-spec -u ✅ Succeeded 12s View ↗
nx run types:build ✅ Succeeded 1s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 1s View ↗
nx run ast-spec:clean-fixtures ✅ Succeeded <1s View ↗
nx run-many -t typecheck ✅ Succeeded 1m 19s View ↗
Additional runs (40) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-09-16 05:13:06 UTC

@camc314

camc314 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Ah I can't stack PRs with forks. I've got another PR to change the value property > camc314#1

Once this is merged, i'll put up that PR.

I've split the two PRs to make the changes, changelog clearer, and to make it easier to review

@codecov

codecov Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.72%. Comparing base (4a742ff) to head (3f4a20e).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12879      +/-   ##
==========================================
- Coverage   94.98%   90.72%   -4.27%     
==========================================
  Files         229      523     +294     
  Lines       11634    17166    +5532     
  Branches     3867     5330    +1463     
==========================================
+ Hits        11051    15573    +4522     
- Misses        251      947     +696     
- Partials      332      646     +314     
Flag Coverage Δ
unittest 90.72% <ø> (-4.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 298 files with indirect coverage changes

🚀 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.

@bradzacher bradzacher added bug Something isn't working package: ast-spec Issues related to @typescript-eslint/ast-spec labels Sep 15, 2026

@bradzacher bradzacher left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we add a test to validate that we reject the non-string-literal case?

@github-actions github-actions Bot added the awaiting response Issues waiting for a reply from the OP or another party label Sep 15, 2026
@camc314
camc314 force-pushed the codex/import-attribute-key branch from 4fd4418 to 64aec4c Compare September 16, 2026 05:07
@camc314
camc314 force-pushed the codex/import-attribute-key branch from 64aec4c to 3f4a20e Compare September 16, 2026 05:07
@github-actions

Copy link
Copy Markdown

Hi @camc314, thanks for the update!

Just a quick heads-up: please try to avoid force-pushing moving forward. Rewriting history makes it harder for us to track incremental changes between reviews.

Since we squash merge anyway, there is no need to keep the commit history "clean" on this branch. Standard pushes are much preferred!

1 similar comment
@github-actions

Copy link
Copy Markdown

Hi @camc314, thanks for the update!

Just a quick heads-up: please try to avoid force-pushing moving forward. Rewriting history makes it harder for us to track incremental changes between reviews.

Since we squash merge anyway, there is no need to keep the commit history "clean" on this branch. Standard pushes are much preferred!

@camc314

camc314 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Oops - apologies for the force push.

Can we add a test to validate that we reject the non-string-literal case?

Done - I've only added a single test with a number as the key to avoid a large number of additional tests to cover all literal varients. But if you want more let me know.

@bradzacher bradzacher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@github-actions github-actions Bot added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Sep 16, 2026
@bradzacher
bradzacher merged commit c34e493 into typescript-eslint:main Sep 16, 2026
60 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge awaiting response Issues waiting for a reply from the OP or another party bug Something isn't working package: ast-spec Issues related to @typescript-eslint/ast-spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants