Skip to content

fix(eslint-plugin-template): [no-interpolation-in-attributes] use keySpan as attr. range and sourceSpan as replacement range #2531

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

niwolf
Copy link
Contributor

@niwolf niwolf commented Jun 18, 2025

Fix for released version 19.8: #2501

This PR fixes an issue in the no-interpolation-in-attributes rule where attributes using attr. (e.g. attr.data-*) were incorrectly autofixed by removing the attr. prefix. The fixer now correctly preserves the full attribute name, ensuring proper binding syntax like [attr.data-example]="...".

If this fix is valid, I'd appreciate it if it could still be included in a v19 release, if possible.

Copy link

nx-cloud bot commented Jun 18, 2025

View your CI Pipeline Execution ↗ for commit 64c5135.

Command Status Duration Result
nx run-many -t e2e-suite --parallel 1 ✅ Succeeded 14s View ↗
nx run-many -t test --codeCoverage ✅ Succeeded 45s View ↗
nx run-many -t build,typecheck,check-rule-docs,... ✅ Succeeded 40s View ↗
nx-cloud record -- pnpm nx sync:check ✅ Succeeded 2s View ↗
nx-cloud record -- pnpm format-check ✅ Succeeded 6s View ↗
nx run-many -t test ✅ Succeeded 30s View ↗
nx run-many -t build ✅ Succeeded 12s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-18 12:56:26 UTC

…Span as attr. range and sourceSpan as replacement range
Copy link

codecov bot commented Jun 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.80%. Comparing base (0228b2a) to head (64c5135).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2531   +/-   ##
=======================================
  Coverage   92.79%   92.80%           
=======================================
  Files         207      207           
  Lines        4374     4379    +5     
  Branches     1020     1020           
=======================================
+ Hits         4059     4064    +5     
  Misses        245      245           
  Partials       70       70           
Flag Coverage Δ
unittest 92.80% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...mplate/src/rules/no-interpolation-in-attributes.ts 92.30% <100.00%> (+1.83%) ⬆️
...ests/rules/no-interpolation-in-attributes/cases.ts 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.

@niwolf niwolf marked this pull request as ready for review June 18, 2025 12:57
@JamesHenry JamesHenry merged commit 727eca3 into angular-eslint:main Jun 19, 2025
9 checks passed
JamesHenry pushed a commit that referenced this pull request Jun 19, 2025
…Span as attr. range and sourceSpan as replacement range (#2531)
@JamesHenry
Copy link
Member

Thanks @niwolf as a special exception to my usual policy, I backported this one as 19.8.1

@niwolf
Copy link
Contributor Author

niwolf commented Jun 20, 2025

Thank you very much! @JamesHenry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy