Update dependency eslint-plugin-import to v2.25.2 (#1555)

* Update dependency eslint-plugin-import to v2.25.2

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Make type imports more explicit

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Enforce use of type imports

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
renovate[bot] 2021-10-17 18:45:58 +02:00 committed by GitHub
parent fc3a3fa1a9
commit 2abe40ef1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
264 changed files with 567 additions and 504 deletions

View file

@ -4,7 +4,8 @@
SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { RefObject, useCallback, useEffect, useState } from 'react'
import type { RefObject } from 'react'
import React, { useCallback, useEffect, useState } from 'react'
import { Overlay, Tooltip } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import { v4 as uuid } from 'uuid'

View file

@ -6,7 +6,7 @@
import React, { Fragment, useRef } from 'react'
import { Button } from 'react-bootstrap'
import { Variant } from 'react-bootstrap/types'
import type { Variant } from 'react-bootstrap/types'
import { useTranslation } from 'react-i18next'
import { ForkAwesomeIcon } from '../../fork-awesome/fork-awesome-icon'
import { CopyOverlay } from '../copy-overlay'

View file

@ -5,7 +5,7 @@
*/
import React from 'react'
import { IconName, IconSize } from './types'
import type { IconName, IconSize } from './types'
export interface ForkAwesomeIconProps {
icon: IconName

View file

@ -4,9 +4,11 @@
SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { ReactElement } from 'react'
import { ForkAwesomeIcon, ForkAwesomeIconProps } from './fork-awesome-icon'
import { IconSize } from './types'
import type { ReactElement } from 'react'
import React from 'react'
import type { ForkAwesomeIconProps } from './fork-awesome-icon'
import { ForkAwesomeIcon } from './fork-awesome-icon'
import type { IconSize } from './types'
export interface ForkAwesomeStackProps {
size?: IconSize

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { ForkAwesomeIcons } from './fork-awesome-icons'
import type { ForkAwesomeIcons } from './fork-awesome-icons'
export type IconName = typeof ForkAwesomeIcons[number]
export type IconSize = '2x' | '3x' | '4x' | '5x'

View file

@ -5,9 +5,10 @@
*/
import React from 'react'
import { Button, ButtonProps } from 'react-bootstrap'
import type { ButtonProps } from 'react-bootstrap'
import { Button } from 'react-bootstrap'
import { ForkAwesomeIcon } from '../fork-awesome/fork-awesome-icon'
import { IconName } from '../fork-awesome/types'
import type { IconName } from '../fork-awesome/types'
import { ShowIf } from '../show-if/show-if'
import './icon-button.scss'

View file

@ -6,7 +6,8 @@
import React from 'react'
import { Trans } from 'react-i18next'
import { IconButton, IconButtonProps } from './icon-button'
import type { IconButtonProps } from './icon-button'
import { IconButton } from './icon-button'
export interface TranslatedIconButtonProps extends IconButtonProps {
i18nKey: string

View file

@ -6,9 +6,9 @@
import React from 'react'
import { ForkAwesomeIcon } from '../fork-awesome/fork-awesome-icon'
import { IconName } from '../fork-awesome/types'
import type { IconName } from '../fork-awesome/types'
import { ShowIf } from '../show-if/show-if'
import { LinkWithTextProps } from './types'
import type { LinkWithTextProps } from './types'
export const ExternalLink: React.FC<LinkWithTextProps> = ({
href,

View file

@ -7,9 +7,9 @@
import React from 'react'
import { Link } from 'react-router-dom'
import { ForkAwesomeIcon } from '../fork-awesome/fork-awesome-icon'
import { IconName } from '../fork-awesome/types'
import type { IconName } from '../fork-awesome/types'
import { ShowIf } from '../show-if/show-if'
import { LinkWithTextProps } from './types'
import type { LinkWithTextProps } from './types'
export const InternalLink: React.FC<LinkWithTextProps> = ({
href,

View file

@ -7,7 +7,7 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { ExternalLink } from './external-link'
import { TranslatedLinkProps } from './types'
import type { TranslatedLinkProps } from './types'
export const TranslatedExternalLink: React.FC<TranslatedLinkProps> = ({ i18nKey, i18nOption, ...props }) => {
const { t } = useTranslation()

View file

@ -7,7 +7,7 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { InternalLink } from './internal-link'
import { TranslatedLinkProps } from './types'
import type { TranslatedLinkProps } from './types'
export const TranslatedInternalLink: React.FC<TranslatedLinkProps> = ({ i18nKey, i18nOption, ...props }) => {
const { t } = useTranslation()

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { StringMap, TOptionsBase } from 'i18next'
import { IconName } from '../fork-awesome/fork-awesome-icon'
import type { StringMap, TOptionsBase } from 'i18next'
import type { IconName } from '../fork-awesome/fork-awesome-icon'
interface GeneralLinkProp {
href: string

View file

@ -8,7 +8,7 @@ import React from 'react'
import { Modal } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import { ForkAwesomeIcon } from '../fork-awesome/fork-awesome-icon'
import { IconName } from '../fork-awesome/types'
import type { IconName } from '../fork-awesome/types'
import { ShowIf } from '../show-if/show-if'
export interface CommonModalProps {

View file

@ -7,7 +7,8 @@
import React from 'react'
import { Button, Modal } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import { CommonModal, CommonModalProps } from './common-modal'
import type { CommonModalProps } from './common-modal'
import { CommonModal } from './common-modal'
export interface DeletionModalProps extends CommonModalProps {
onConfirm: () => void

View file

@ -6,7 +6,8 @@
import React from 'react'
import { Modal } from 'react-bootstrap'
import { CommonModal, CommonModalProps } from './common-modal'
import type { CommonModalProps } from './common-modal'
import { CommonModal } from './common-modal'
export const ErrorModal: React.FC<CommonModalProps> = ({ show, onHide, titleI18nKey, icon, children }) => {
return (

View file

@ -5,7 +5,7 @@
*/
import { extractFrontmatter } from './extract-frontmatter'
import { PresentFrontmatterExtractionResult } from './types'
import type { PresentFrontmatterExtractionResult } from './types'
describe('frontmatter extraction', () => {
describe('isPresent property', () => {

View file

@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { FrontmatterExtractionResult } from './types'
import type { FrontmatterExtractionResult } from './types'
const FRONTMATTER_BEGIN_REGEX = /^-{3,}$/
const FRONTMATTER_END_REGEX = /^(?:-{3,}|\.{3,})$/

View file

@ -6,7 +6,8 @@
// import { RevealOptions } from 'reveal.js'
import { load } from 'js-yaml'
import { ISO6391, NoteTextDirection, NoteType, RawNoteFrontmatter, SlideOptions } from './types'
import type { RawNoteFrontmatter, SlideOptions } from './types'
import { ISO6391, NoteTextDirection, NoteType } from './types'
import { initialSlideOptions } from '../../../redux/note-details/initial-state'
/**

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { RevealOptions } from 'reveal.js'
import type { RevealOptions } from 'reveal.js'
export type FrontmatterExtractionResult = PresentFrontmatterExtractionResult | NonPresentFrontmatterExtractionResult

View file

@ -9,7 +9,7 @@ import { Redirect } from 'react-router'
import { useParams } from 'react-router-dom'
import { getNote } from '../../../api/notes'
import { NotFoundErrorScreen } from './not-found-error-screen'
import { NoteDto } from '../../../api/notes/types'
import type { NoteDto } from '../../../api/notes/types'
interface RouteParameters {
id: string