Fix ExpectType with extra whitespace#1011
Merged
jakebailey merged 1 commit intomicrosoft:mainfrom Jun 18, 2024
Merged
Conversation
sandersn
approved these changes
Jun 18, 2024
jakebailey
added a commit
to jakebailey/DefinitelyTyped-tools
that referenced
this pull request
Jun 20, 2024
This reverts commit c3d86f3.
jakebailey
added a commit
that referenced
this pull request
Jun 20, 2024
jakebailey
added a commit
to jakebailey/DefinitelyTyped-tools
that referenced
this pull request
Jun 21, 2024
…osoft#1013) This reverts commit 5476570.
Merged
This was referenced Nov 29, 2024
JoshuaKGoldberg
added a commit
to JoshuaKGoldberg/eslint-plugin-expect-type
that referenced
this pull request
Nov 29, 2024
## PR Checklist - [x] Addresses an existing open issue: fixes #644 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Updates the regular expression to allow any amount of spaces between the `//` and the rest of the type. Also updates the payload to `.trim()`. Similar in implementation to microsoft/DefinitelyTyped-tools#1011, so: Co-authored-by: @jakebailey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed this when looking at a DT break; we were strict about there being exactly one space before and after
$ExpectType, but silently ignored anything that didn't match that. There are quite a few$ExpectTypes on DT that are being silently ignored!Rather than being strict, this just ignores the extra whitespace.