From cb778057121eb26f28cdd8cdedbb2bd9de026f7a Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 8 Jul 2021 22:35:07 +0200 Subject: [PATCH] Improvement: Fix alignment in read-the-docs section --- .codeclimate.yml | 5 +++++ src/templates/Markdown/MarkdownList.jsx | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 00000000..af639bdb --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,5 @@ +version: '2' # required to adjust maintainability checks +checks: + method-complexity: + config: + threshold: 7 diff --git a/src/templates/Markdown/MarkdownList.jsx b/src/templates/Markdown/MarkdownList.jsx index 1b330dc6..604a65f6 100644 --- a/src/templates/Markdown/MarkdownList.jsx +++ b/src/templates/Markdown/MarkdownList.jsx @@ -59,12 +59,12 @@ export default function MarkdownList({ data, location, pageContext }) { const keys = Object.keys(nestedModules).sort() const children = [] - - children.push( -
  • - {title} -
  • - ) + if (title) + children.push( +
  • + {title} +
  • + ) keys.forEach((element) => { children.push(