Skip to content

Conversation

@jakebailey
Copy link
Member

@jakebailey jakebailey commented Jun 18, 2024

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.

@jakebailey jakebailey merged commit c3d86f3 into microsoft:main Jun 18, 2024
@jakebailey jakebailey deleted the expect-type-whitespace branch June 18, 2024 22:59
jakebailey added a commit to jakebailey/DefinitelyTyped-tools that referenced this pull request Jun 20, 2024
jakebailey added a commit to jakebailey/DefinitelyTyped-tools that referenced this pull request Jun 21, 2024
@jakebailey jakebailey mentioned this pull request Jun 22, 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
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