Skip to content

Commit

Permalink
Fix false positives for arealess templates in named-grid-areas-no-inv…
Browse files Browse the repository at this point in the history
…alid (#6042)
  • Loading branch information
jeddy3 committed Apr 28, 2022
1 parent 74b35b7 commit ebd556f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/rules/named-grid-areas-no-invalid/__tests__/index.js
Expand Up @@ -9,6 +9,9 @@ testRule({
config: [true],

accept: [
{
code: 'a { grid-template-areas: 1fr / auto 1fr auto; }',
},
{
code: 'a { grid-template-areas: "a a a" "b b b"; }',
},
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/named-grid-areas-no-invalid/index.js
Expand Up @@ -58,6 +58,8 @@ const rule = (primary) => {

if (reportSent) return;

if (areas.length === 0) return;

if (!isRectangular(areas)) {
complain(messages.expectedSameNumber());

Expand Down

0 comments on commit ebd556f

Please sign in to comment.