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

Fix false negatives for grid shorthands in named-grid-areas-no-invalid #5514

Merged
merged 4 commits into from Sep 6, 2021

Conversation

jeddy3
Copy link
Member

@jeddy3 jeddy3 commented Sep 5, 2021

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

Ref: #5513 (review)

Is there anything in the PR that needs further explanation?

grid and grid-template.

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

@jeddy3 Thank you for creating the PR. I've left some refactoring suggestions, but it looks almost fine! 😄

lib/rules/named-grid-areas-no-invalid/index.js Outdated Show resolved Hide resolved
lib/rules/named-grid-areas-no-invalid/__tests__/index.js Outdated Show resolved Hide resolved
jeddy3 and others added 2 commits September 6, 2021 14:33
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
@jeddy3
Copy link
Member Author

jeddy3 commented Sep 6, 2021

Thanks for the review and suggestions. I've committed them both.

@ybiquitous
Copy link
Member

My suggestion code seems to be something wrong. 👀

@ybiquitous
Copy link
Member

By the change of indentation (80f5ab3), it is necessary to change the expectation of column:

diff --git a/lib/rules/named-grid-areas-no-invalid/__tests__/index.js b/lib/rules/named-grid-areas-no-invalid/__tests__/index.js
index e49bc06d..4855c7fd 100644
--- a/lib/rules/named-grid-areas-no-invalid/__tests__/index.js
+++ b/lib/rules/named-grid-areas-no-invalid/__tests__/index.js
@@ -117,7 +117,7 @@ testRule({
 				}`,
 			message: messages.expectedToken(),
 			line: 2,
-			column: 4,
+			column: 2,
 		},
 		{
 			code: 'a { grid-template-areas: "" "" ""; }',

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

@jeddy3 Sorry for the inconvenience. LGTM! 👍🏼

@jeddy3
Copy link
Member Author

jeddy3 commented Sep 6, 2021

No worries at all! I appreciate the review 😄

@jeddy3 jeddy3 merged commit 30bb6fa into v14 Sep 6, 2021
@jeddy3 jeddy3 deleted the fix-negatives-for-named-grid branch September 6, 2021 15:24
@jeddy3
Copy link
Member Author

jeddy3 commented Sep 6, 2021

  • Fixed: named-grid-areas-no-invalid false negatives for grid and grid-template shorthand properties (#5514).

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