Skip to content

Commit

Permalink
simplify and remove array generation
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Nov 14, 2023
1 parent a011399 commit b3fad8e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions bin/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,20 @@ module.exports = {
},

"unicorn/template-indent"({ options }) {
if (options.length === 0) {
if (!options[0]) {
return false;
}

const firstOption = options[0];

const tags = firstOption.tags || [];

return (
(firstOption?.comments?.includes("HTML") ||
tags.includes("css") ||
tags.includes("graphql") ||
tags.includes("gql") ||
tags.includes("html") ||
tags.includes("markdown") ||
tags.includes("md")) === false
return !Boolean(
firstOption.comments?.includes("HTML") ||
firstOption.tags?.includes("css") ||
firstOption.tags?.includes("graphql") ||
firstOption.tags?.includes("gql") ||
firstOption.tags?.includes("html") ||
firstOption.tags?.includes("markdown") ||
firstOption.tags?.includes("md")
);
},

Expand Down

0 comments on commit b3fad8e

Please sign in to comment.