diff options
author | philippe-perrin-sonarsource <philippe.perrin@sonarsource.com> | 2019-07-18 17:11:28 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-07-19 20:21:15 +0200 |
commit | 3ce719d3c40672a6d698e5d95f7c01a6d9e08f2c (patch) | |
tree | 7f148df9660d5f625316231108fad76354b93d0f /server | |
parent | 7d8052837730ed748a0dd48f647395a81e2a8d1e (diff) | |
download | sonarqube-3ce719d3c40672a6d698e5d95f7c01a6d9e08f2c.tar.gz sonarqube-3ce719d3c40672a6d698e5d95f7c01a6d9e08f2c.zip |
Sort import in sonar-docs
Diffstat (limited to 'server')
22 files changed, 43 insertions, 43 deletions
diff --git a/server/sonar-docs/src/components/CategoryBlockLink.tsx b/server/sonar-docs/src/components/CategoryBlockLink.tsx index ef062e2cb17..bc384274f3d 100644 --- a/server/sonar-docs/src/components/CategoryBlockLink.tsx +++ b/server/sonar-docs/src/components/CategoryBlockLink.tsx @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import classNames from 'classnames'; -import PageLink from './PageLink'; +import * as React from 'react'; +import { MarkdownRemark } from '../@types/graphql-types'; import ChevronDownIcon from './icons/ChevronDownIcon'; import ChevronUpIcon from './icons/ChevronUpIcon'; -import { MarkdownRemark } from '../@types/graphql-types'; +import PageLink from './PageLink'; interface Props { children: (MarkdownRemark | JSX.Element)[]; diff --git a/server/sonar-docs/src/components/HeaderList.tsx b/server/sonar-docs/src/components/HeaderList.tsx index a8c8abf14d9..64578bf203f 100644 --- a/server/sonar-docs/src/components/HeaderList.tsx +++ b/server/sonar-docs/src/components/HeaderList.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import * as PropTypes from 'prop-types'; +import * as React from 'react'; import { MarkdownHeading } from '../@types/graphql-types'; interface Props { diff --git a/server/sonar-docs/src/components/HeaderListProvider.tsx b/server/sonar-docs/src/components/HeaderListProvider.tsx index 29239eba07a..afeb312698d 100644 --- a/server/sonar-docs/src/components/HeaderListProvider.tsx +++ b/server/sonar-docs/src/components/HeaderListProvider.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import * as PropTypes from 'prop-types'; +import * as React from 'react'; import { MarkdownHeading } from '../@types/graphql-types'; interface Props { diff --git a/server/sonar-docs/src/components/HeadingAnchor.tsx b/server/sonar-docs/src/components/HeadingAnchor.tsx index a49569c9e70..90a42f193ca 100644 --- a/server/sonar-docs/src/components/HeadingAnchor.tsx +++ b/server/sonar-docs/src/components/HeadingAnchor.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import classNames from 'classnames'; +import * as React from 'react'; interface Props { active: boolean; diff --git a/server/sonar-docs/src/components/HeadingsLink.tsx b/server/sonar-docs/src/components/HeadingsLink.tsx index 6affaf64cdc..447a831188e 100644 --- a/server/sonar-docs/src/components/HeadingsLink.tsx +++ b/server/sonar-docs/src/components/HeadingsLink.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HeadingAnchor from './HeadingAnchor'; import { MarkdownHeading } from '../@types/graphql-types'; +import HeadingAnchor from './HeadingAnchor'; const MINIMUM_TOP_MARGIN = 80; const HEADER_SCROLL_MARGIN = 100; diff --git a/server/sonar-docs/src/components/PageLink.tsx b/server/sonar-docs/src/components/PageLink.tsx index e7aa23b802f..0f164be9337 100644 --- a/server/sonar-docs/src/components/PageLink.tsx +++ b/server/sonar-docs/src/components/PageLink.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import classNames from 'classnames'; import { Link } from 'gatsby'; -import { getMarkdownRemarkTitle, getMarkdownRemarkUrl } from './utils'; +import * as React from 'react'; import { MarkdownRemark } from '../@types/graphql-types'; +import { getMarkdownRemarkTitle, getMarkdownRemarkUrl } from './utils'; interface Props { className?: string; diff --git a/server/sonar-docs/src/components/PluginMetaData.tsx b/server/sonar-docs/src/components/PluginMetaData.tsx index 80fd7234413..e3348b8af23 100644 --- a/server/sonar-docs/src/components/PluginMetaData.tsx +++ b/server/sonar-docs/src/components/PluginMetaData.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { createPortal } from 'react-dom'; +import { Dict, PluginMetaDataInfo } from '../@types/types'; import PluginVersionMetaData from './PluginVersionMetaData'; import { getPluginMetaData } from './utils'; -import { Dict, PluginMetaDataInfo } from '../@types/types'; interface Props { location: Pick<Location, 'pathname'>; diff --git a/server/sonar-docs/src/components/PluginVersionMetaData.tsx b/server/sonar-docs/src/components/PluginVersionMetaData.tsx index e71fae755eb..bd958712ec7 100644 --- a/server/sonar-docs/src/components/PluginVersionMetaData.tsx +++ b/server/sonar-docs/src/components/PluginVersionMetaData.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import classNames from 'classnames'; +import * as React from 'react'; import { PluginVersionInfo } from '../@types/types'; interface Props { diff --git a/server/sonar-docs/src/components/Search.tsx b/server/sonar-docs/src/components/Search.tsx index a4a24c40eee..5de1ea85755 100644 --- a/server/sonar-docs/src/components/Search.tsx +++ b/server/sonar-docs/src/components/Search.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; -import lunr, { LunrIndex, LunrBuilder, LunrToken, LunrMatch } from 'lunr'; import { sortBy } from 'lodash'; -import ClearIcon from './icons/ClearIcon'; -import { getUrlsList } from './navTreeUtils'; -import { getMarkdownRemarkUrl, getMarkdownRemarkTitle, isDefined } from './utils'; +import lunr, { LunrBuilder, LunrIndex, LunrMatch, LunrToken } from 'lunr'; +import * as React from 'react'; import { MarkdownRemark } from '../@types/graphql-types'; import { DocNavigationItem, SearchResult } from '../@types/types'; +import ClearIcon from './icons/ClearIcon'; +import { getUrlsList } from './navTreeUtils'; +import { getMarkdownRemarkTitle, getMarkdownRemarkUrl, isDefined } from './utils'; interface Props { navigation: DocNavigationItem[]; diff --git a/server/sonar-docs/src/components/SearchEntryResult.tsx b/server/sonar-docs/src/components/SearchEntryResult.tsx index 80320f2c90f..98eddb8b48b 100644 --- a/server/sonar-docs/src/components/SearchEntryResult.tsx +++ b/server/sonar-docs/src/components/SearchEntryResult.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { Link } from 'gatsby'; -import { highlightMarks, cutWords } from './utils'; +import * as React from 'react'; import { SearchResult } from '../@types/types'; +import { cutWords, highlightMarks } from './utils'; interface ResultProps { result: SearchResult; diff --git a/server/sonar-docs/src/components/Sidebar.tsx b/server/sonar-docs/src/components/Sidebar.tsx index 9cd56bf9d68..f79909abfca 100644 --- a/server/sonar-docs/src/components/Sidebar.tsx +++ b/server/sonar-docs/src/components/Sidebar.tsx @@ -17,24 +17,24 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { Link } from 'gatsby'; +import * as React from 'react'; +import { MarkdownRemark } from '../@types/graphql-types'; +import { DocNavigationItem, DocVersion, SearchResult } from '../@types/types'; import CategoryBlockLink from './CategoryBlockLink'; import ExternalLink from './ExternalLink'; -import PageLink from './PageLink'; -import Search from './Search'; -import SearchEntryResult from './SearchEntryResult'; -import VersionSelect from './VersionSelect'; import DownloadIcon from './icons/DownloadIcon'; import { getNavTree, + getOpenChainFromPath, isDocsNavigationBlock, isDocsNavigationExternalLink, - getOpenChainFromPath, testPathAgainstUrl } from './navTreeUtils'; -import { MarkdownRemark } from '../@types/graphql-types'; -import { SearchResult, DocVersion, DocNavigationItem } from '../@types/types'; +import PageLink from './PageLink'; +import Search from './Search'; +import SearchEntryResult from './SearchEntryResult'; +import VersionSelect from './VersionSelect'; interface Props { location: Location; diff --git a/server/sonar-docs/src/components/VersionSelect.tsx b/server/sonar-docs/src/components/VersionSelect.tsx index a7ea4465824..a7bbca265e8 100644 --- a/server/sonar-docs/src/components/VersionSelect.tsx +++ b/server/sonar-docs/src/components/VersionSelect.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { DocVersion } from '../@types/types'; import ChevronDownIcon from './icons/ChevronDownIcon'; import ChevronUpIcon from './icons/ChevronUpIcon'; import OutsideClickHandler from './OutsideClickHandler'; -import { DocVersion } from '../@types/types'; interface Props { isOnCurrentVersion: boolean; diff --git a/server/sonar-docs/src/components/__tests__/CategoryBlockLink-test.tsx b/server/sonar-docs/src/components/__tests__/CategoryBlockLink-test.tsx index 64a068bd3a7..6330ed47eac 100644 --- a/server/sonar-docs/src/components/__tests__/CategoryBlockLink-test.tsx +++ b/server/sonar-docs/src/components/__tests__/CategoryBlockLink-test.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import CategoryBlockLink from '../CategoryBlockLink'; +import * as React from 'react'; import { MarkdownRemark } from '../../@types/graphql-types'; +import CategoryBlockLink from '../CategoryBlockLink'; it('should render correctly', () => { expect(shallowRender({})).toMatchSnapshot(); diff --git a/server/sonar-docs/src/components/__tests__/ExternalLink-test.tsx b/server/sonar-docs/src/components/__tests__/ExternalLink-test.tsx index 5be538d9ca4..8a7da74b0f3 100644 --- a/server/sonar-docs/src/components/__tests__/ExternalLink-test.tsx +++ b/server/sonar-docs/src/components/__tests__/ExternalLink-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; import ExternalLink from '../ExternalLink'; it('should render correctly', () => { diff --git a/server/sonar-docs/src/components/__tests__/PageLink-test.tsx b/server/sonar-docs/src/components/__tests__/PageLink-test.tsx index f00e665e670..4419eeccca6 100644 --- a/server/sonar-docs/src/components/__tests__/PageLink-test.tsx +++ b/server/sonar-docs/src/components/__tests__/PageLink-test.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import PageLink from '../PageLink'; +import * as React from 'react'; import { MarkdownRemark } from '../../@types/graphql-types'; +import PageLink from '../PageLink'; const page = { frontmatter: { title: 'Foo', url: '/foo' } } as MarkdownRemark; diff --git a/server/sonar-docs/src/components/__tests__/PluginMetaData-test.tsx b/server/sonar-docs/src/components/__tests__/PluginMetaData-test.tsx index 78c9ca927d3..1ccae880184 100644 --- a/server/sonar-docs/src/components/__tests__/PluginMetaData-test.tsx +++ b/server/sonar-docs/src/components/__tests__/PluginMetaData-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { mount } from 'enzyme'; +import * as React from 'react'; import PluginMetaData from '../PluginMetaData'; import { getPluginMetaData } from '../utils'; diff --git a/server/sonar-docs/src/components/__tests__/PluginVersionMetaData-test.tsx b/server/sonar-docs/src/components/__tests__/PluginVersionMetaData-test.tsx index 699599a3efb..a59345a21eb 100644 --- a/server/sonar-docs/src/components/__tests__/PluginVersionMetaData-test.tsx +++ b/server/sonar-docs/src/components/__tests__/PluginVersionMetaData-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; import PluginVersionMetaData from '../PluginVersionMetaData'; it('should render correctly', () => { diff --git a/server/sonar-docs/src/components/__tests__/Sidebar-test.tsx b/server/sonar-docs/src/components/__tests__/Sidebar-test.tsx index a7d64ea8ba2..8cada3a29e0 100644 --- a/server/sonar-docs/src/components/__tests__/Sidebar-test.tsx +++ b/server/sonar-docs/src/components/__tests__/Sidebar-test.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; -import { FetchMock } from 'jest-fetch-mock'; import { shallow } from 'enzyme'; -import Sidebar from '../Sidebar'; +import { FetchMock } from 'jest-fetch-mock'; +import * as React from 'react'; import { MarkdownRemark } from '../../@types/graphql-types'; +import Sidebar from '../Sidebar'; jest.mock('../navTreeUtils', () => { return { diff --git a/server/sonar-docs/src/components/__tests__/navTreeUtils-test.ts b/server/sonar-docs/src/components/__tests__/navTreeUtils-test.ts index c7d188f1d91..a73c7a38192 100644 --- a/server/sonar-docs/src/components/__tests__/navTreeUtils-test.ts +++ b/server/sonar-docs/src/components/__tests__/navTreeUtils-test.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { getUrlsList, getOpenChainFromPath, testPathAgainstUrl } from '../navTreeUtils'; +import { getOpenChainFromPath, getUrlsList, testPathAgainstUrl } from '../navTreeUtils'; const navTree = [ 'path/value', diff --git a/server/sonar-docs/src/components/navTreeUtils.ts b/server/sonar-docs/src/components/navTreeUtils.ts index 10203272179..d5b208bd532 100644 --- a/server/sonar-docs/src/components/navTreeUtils.ts +++ b/server/sonar-docs/src/components/navTreeUtils.ts @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { flatten } from 'lodash'; +import NavigationTree from '../../static/StaticNavigationTree.json'; import { DocNavigationItem, DocsNavigationBlock, DocsNavigationExternalLink } from '../@types/types'; -import NavigationTree from '../../static/StaticNavigationTree.json'; export function getNavTree() { return NavigationTree as DocNavigationItem[]; diff --git a/server/sonar-docs/src/layouts/index.tsx b/server/sonar-docs/src/layouts/index.tsx index f6d0923d4f8..3547c463437 100644 --- a/server/sonar-docs/src/layouts/index.tsx +++ b/server/sonar-docs/src/layouts/index.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { graphql, StaticQuery } from 'gatsby'; import * as React from 'react'; -import { StaticQuery, graphql } from 'gatsby'; +import { MarkdownRemark, MarkdownRemarkConnection } from '../@types/graphql-types'; import Footer from '../components/Footer'; import HeaderListProvider from '../components/HeaderListProvider'; import HeadingsLink from '../components/HeadingsLink'; import PluginMetaData from '../components/PluginMetaData'; import Sidebar from '../components/Sidebar'; -import { MarkdownRemarkConnection, MarkdownRemark } from '../@types/graphql-types'; import './layout.css'; const version = process.env.GATSBY_DOCS_VERSION || '1.0'; diff --git a/server/sonar-docs/src/templates/page.tsx b/server/sonar-docs/src/templates/page.tsx index 61651aa4fdc..9feef164ae3 100644 --- a/server/sonar-docs/src/templates/page.tsx +++ b/server/sonar-docs/src/templates/page.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { graphql } from 'gatsby'; import * as React from 'react'; import Helmet from 'react-helmet'; -import { graphql } from 'gatsby'; +import { MarkdownHeading, MarkdownRemark, MarkdownRemarkConnection } from '../@types/graphql-types'; import HeaderList from '../components/HeaderList'; -import { MarkdownRemark, MarkdownRemarkConnection, MarkdownHeading } from '../@types/graphql-types'; interface Props { data: { |