From 6ac834e0375e11c41d5e9aaa38a0c9b19f05f545 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Thu, 16 Jan 2020 11:18:43 -0600 Subject: [PATCH] es6: remove comments between import groups throughout per https://github.com/iterative/dvc.org/issues/789#issuecomment-573267931 --- pages/doc.js | 6 +++--- server.js | 1 - src/Documentation/Markdown/Markdown.js | 10 +++++----- src/Documentation/RightPanel/RightPanel.js | 2 +- src/Documentation/SidebarMenu/SidebarMenu.js | 10 +++++----- src/Layout/index.js | 4 ++-- src/PromoSection/index.js | 2 +- src/TopMenu/index.js | 8 ++++---- 8 files changed, 21 insertions(+), 22 deletions(-) diff --git a/pages/doc.js b/pages/doc.js index 4030113bfc..556556449c 100644 --- a/pages/doc.js +++ b/pages/doc.js @@ -7,7 +7,7 @@ import Error from 'next/error' import Router from 'next/router' import fetch from 'isomorphic-fetch' import kebabCase from 'lodash.kebabcase' -// components + import Page from '../src/Page' import { HeadInjector } from '../src/Documentation/HeadInjector' import Hamburger from '../src/Hamburger' @@ -15,9 +15,9 @@ import SearchForm from '../src/SearchForm' import SidebarMenu from '../src/Documentation/SidebarMenu/SidebarMenu' import Markdown from '../src/Documentation/Markdown/Markdown' import RightPanel from '../src/Documentation/RightPanel/RightPanel' -// sidebar data and helpers + import { getItemByPath, structure } from '../src/utils/sidebar' -// styles + import { media } from '../src/styles' const ROOT_ELEMENT = 'bodybag' diff --git a/server.js b/server.js index 1c8d048cd1..ddc9d089a9 100644 --- a/server.js +++ b/server.js @@ -1,5 +1,4 @@ /* eslint-env node */ - /* * Custom server (with custom routes) See * https://nextjs.org/docs/advanced-features/custom-server diff --git a/src/Documentation/Markdown/Markdown.js b/src/Documentation/Markdown/Markdown.js index 60f1f95f35..9fb18ea255 100644 --- a/src/Documentation/Markdown/Markdown.js +++ b/src/Documentation/Markdown/Markdown.js @@ -2,13 +2,13 @@ import React from 'react' import PropTypes from 'prop-types' import NextLink from 'next/link' import Router from 'next/router' -// components + import ReactMarkdown from 'react-markdown' import { LightButton } from '../LightButton' import Tutorials from '../Tutorials' import Tooltip from '../../Tooltip' import Collapsible from 'react-collapsible' -// syntax highlighter + import { Light as SyntaxHighlighter } from 'react-syntax-highlighter' import { docco } from 'react-syntax-highlighter/dist/cjs/styles/hljs' import python from 'react-syntax-highlighter/dist/cjs/languages/hljs/python' @@ -20,11 +20,11 @@ import vim from 'react-syntax-highlighter/dist/cjs/languages/hljs/vim' import usage from './lang/usage' import dvc from './lang/dvc' import linker from './utils/remark-linker' -// consts + import { PAGE_DOC } from '../../consts' -// utils + import kebabCase from 'lodash.kebabcase' -// styles + import styled from 'styled-components' import { media } from '../../../src/styles' diff --git a/src/Documentation/RightPanel/RightPanel.js b/src/Documentation/RightPanel/RightPanel.js index 085d54a74c..187574aa3e 100644 --- a/src/Documentation/RightPanel/RightPanel.js +++ b/src/Documentation/RightPanel/RightPanel.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import styled from 'styled-components' import { LightButton } from '../LightButton' import Tutorials from '../Tutorials' -// utils + import throttle from 'lodash.throttle' const ROOT_ELEMENT = 'bodybag' diff --git a/src/Documentation/SidebarMenu/SidebarMenu.js b/src/Documentation/SidebarMenu/SidebarMenu.js index e5f1ab0811..48f90ad036 100644 --- a/src/Documentation/SidebarMenu/SidebarMenu.js +++ b/src/Documentation/SidebarMenu/SidebarMenu.js @@ -3,16 +3,16 @@ import PerfectScrollbar from 'perfect-scrollbar' import scrollIntoView from 'dom-scroll-into-view' import PropTypes from 'prop-types' import NextLink from 'next/link' -// consts + import { PAGE_DOC } from '../../consts' -// components + import DownloadButton from '../../DownloadButton' -// utils + import includes from 'lodash.includes' -// styles + import styled from 'styled-components' import { OnlyDesktop, media } from '../../styles' -// sidebar helpers + import { getParentsListFromPath } from '../../utils/sidebar' /** Height of each menu child items (to calc Element weight for animations) */ diff --git a/src/Layout/index.js b/src/Layout/index.js index 016130e2f5..c7e5563a12 100644 --- a/src/Layout/index.js +++ b/src/Layout/index.js @@ -2,11 +2,11 @@ import React, { useEffect } from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import { useRouter } from 'next/router' -// components + import TopMenu from '../TopMenu' import Footer from '../Footer' import HamburgerMenu from '../HamburgerMenu' -// utils + import { initGA, logPageView } from '../utils/ga' export default function Layout({ children, enableSmoothScroll }) { diff --git a/src/PromoSection/index.js b/src/PromoSection/index.js index c396551be4..c608dd1501 100644 --- a/src/PromoSection/index.js +++ b/src/PromoSection/index.js @@ -3,7 +3,7 @@ import styled from 'styled-components' import Router from 'next/router' import { media } from '../styles' import { logEvent } from '../utils/ga' -// consts + import { PAGE_DOC } from '../consts' function goToDocGetStarted() { diff --git a/src/TopMenu/index.js b/src/TopMenu/index.js index 9633fdf86a..c9f6cb7f3c 100644 --- a/src/TopMenu/index.js +++ b/src/TopMenu/index.js @@ -1,14 +1,14 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import NextLink from 'next/link' -// components + import Nav from '../Nav' -// utils + import throttle from 'lodash.throttle' -// styles + import styled from 'styled-components' import { media } from '../styles' -// constants + import { HEADER } from '../consts' const MIN_HEIGHT = 78