Skip to content

fix(eslint-plugin): respect ECMAScript line terminators in ts-comment rules#12352

Merged
JoshuaKGoldberg merged 1 commit into
typescript-eslint:mainfrom
lumirlumir:fix/respect-ecmascript-line-terminators
May 27, 2026
Merged

fix(eslint-plugin): respect ECMAScript line terminators in ts-comment rules#12352
JoshuaKGoldberg merged 1 commit into
typescript-eslint:mainfrom
lumirlumir:fix/respect-ecmascript-line-terminators

Conversation

@lumirlumir

@lumirlumir lumirlumir commented May 21, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

Overview

This PR fixes an issue mentioned in #12353.

😄

@typescript-eslint

Copy link
Copy Markdown
Contributor

Thanks for the PR, @lumirlumir!

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 May 21, 2026

Copy link
Copy Markdown

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 11018d4
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/6a0f2aba8d7fd10008414864
😎 Deploy Preview https://deploy-preview-12352--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: 97 (🟢 up 6 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.

@nx-cloud

nx-cloud Bot commented May 21, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 11018d4

Command Status Duration Result
nx run-many -t lint ✅ Succeeded 2m 8s View ↗
nx run generate-configs ✅ Succeeded 4s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 1s View ↗
nx run types:build ✅ Succeeded 1s View ↗
nx run integration-tests:test ✅ Succeeded 2s View ↗
nx run-many -t typecheck ✅ Succeeded 44s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 8s View ↗
nx run-many --target=build --parallel --exclude... ✅ Succeeded 23s View ↗
Additional runs (34) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-05-21 16:00:07 UTC

@lumirlumir lumirlumir changed the title fix: ban-ts-comment and prefer-ts-expect-error don't respect ECMAScript line terminators fix: respect ECMAScript line terminators ts-comment rules May 21, 2026
@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.82%. Comparing base (b02883f) to head (11018d4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12352   +/-   ##
=======================================
  Coverage   86.82%   86.82%           
=======================================
  Files         513      513           
  Lines       16494    16494           
  Branches     5141     5141           
=======================================
  Hits        14321    14321           
  Misses       1478     1478           
  Partials      695      695           
Flag Coverage Δ
unittest 86.82% <100.00%> (ø)

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

Files with missing lines Coverage Δ
packages/eslint-plugin/src/rules/ban-ts-comment.ts 100.00% <100.00%> (ø)
.../eslint-plugin/src/rules/prefer-ts-expect-error.ts 100.00% <100.00%> (ø)
packages/utils/src/ast-utils/misc.ts 50.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.

@lumirlumir lumirlumir changed the title fix: respect ECMAScript line terminators ts-comment rules fix: respect ECMAScript line terminators in ts-comment rules May 21, 2026
@lumirlumir lumirlumir changed the title fix: respect ECMAScript line terminators in ts-comment rules fix(eslint-plugin): respect ECMAScript line terminators in ts-comment rules May 21, 2026

@JoshuaKGoldberg JoshuaKGoldberg 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.

LGTM once you think it's ready! 🥇

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label May 22, 2026
@lumirlumir

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review! It’s all ready now :)

@lumirlumir lumirlumir marked this pull request as ready for review May 22, 2026 12:49
@JoshuaKGoldberg JoshuaKGoldberg merged commit 1ab4284 into typescript-eslint:main May 27, 2026
76 of 77 checks passed
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Jun 7, 2026
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 8.60.0 | 8.60.1 |
| npm        | @typescript-eslint/parser        | 8.60.0 | 8.60.1 |


## [v8.60.1](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8601-2026-06-01)

##### 🩹 Fixes

- **eslint-plugin:** \[no-shadow] correct rule to match ESLint v10 handling ([#12182](typescript-eslint/typescript-eslint#12182))
- **eslint-plugin:** respect ECMAScript line terminators in ts-comment rules ([#12352](typescript-eslint/typescript-eslint#12352))

##### ❤️ Thank You

- lumir
- Nevette Bailey [@nevette-bailey](https://github.com/nevette-bailey)

See [GitHub Releases](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1) for more information.

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Jun 12, 2026
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 8.60.0 | 8.61.0 |
| npm        | @typescript-eslint/parser        | 8.60.0 | 8.61.0 |


## [v8.61.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8610-2026-06-08)

##### 🚀 Features

- **ast-spec:** change type of `UnaryExpression.prefix` to always `true` ([#12372](typescript-eslint/typescript-eslint#12372))

##### ❤️ Thank You

- Kirk Waiblinger [@kirkwaiblinger](https://github.com/kirkwaiblinger)

See [GitHub Releases](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.61.0) for more information.

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.


## [v8.60.1](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8601-2026-06-01)

##### 🩹 Fixes

- **eslint-plugin:** \[no-shadow] correct rule to match ESLint v10 handling ([#12182](typescript-eslint/typescript-eslint#12182))
- **eslint-plugin:** respect ECMAScript line terminators in ts-comment rules ([#12352](typescript-eslint/typescript-eslint#12352))

##### ❤️ Thank You

- lumir
- Nevette Bailey [@nevette-bailey](https://github.com/nevette-bailey)

See [GitHub Releases](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1) for more information.

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: ban-ts-comment and prefer-ts-expect-error don't respect ECMAScript line terminators

2 participants