Skip to content

Commit

Permalink
chore: format code (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
iChenLei authored Feb 9, 2022
1 parent ddf150f commit ebecd33
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/rules/required-root-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,9 @@ module.exports = {
if (!rootTagName) return;
let tags;
if (node && node.body && node.body.length >= 0) {
tags = node.body.filter(tag => tag.type === "WXElement");
tags = node.body.filter((tag) => tag.type === "WXElement");
}
if (
!(
tags &&
tags.length === 1 &&
tags[0].name === rootTagName
)
) {
if (!(tags && tags.length === 1 && tags[0].name === rootTagName)) {
context.report({
node,
messageId: "rootTag",
Expand Down

1 comment on commit ebecd33

@vercel
Copy link

@vercel vercel bot commented on ebecd33 Feb 9, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.