Skip to content
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

Refactor to improve types for max-* rules #5508

Merged
merged 2 commits into from Sep 2, 2021

Conversation

ybiquitous
Copy link
Member

Which issue, if any, is this issue related to?

Part of #4496

Is there anything in the PR that needs further explanation?

This change removes // @ts-nocheck from the max-* rules.

This change removes `// @ts-nocheck` from the `max-*` rules.
@ybiquitous ybiquitous marked this pull request as ready for review September 2, 2021 13:37
@ybiquitous
Copy link
Member Author

ybiquitous commented Sep 2, 2021

To-do

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@@ -67,18 +64,19 @@ function rule(max, options, context) {
const rootRawsAfter = root.raws.after;

// not document node
// @ts-expect-error -- TS2339: Property 'document' does not exist on type 'Root'.
Copy link
Member

Choose a reason for hiding this comment

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

We'll likely need to revisit this document stuff at some point in light of postcss/postcss#1582.

I think it's mainly the max whitespace rules that touch it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I also think so. 👍🏼
I didn't know how I should handle it, so I've left // @ts-expect-error comments.

Copy link
Member

Choose a reason for hiding this comment

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

Leaving // @ts-expect-error comments was the right thing to do.

Feel free to merge.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you!

@ybiquitous ybiquitous merged commit 10d0bd8 into v14 Sep 2, 2021
@ybiquitous ybiquitous deleted the refactor-types-for-max-rule branch September 2, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants