mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-28 22:15:12 -04:00
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:
parent
fc3a3fa1a9
commit
2abe40ef1d
264 changed files with 567 additions and 504 deletions
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react'
|
||||
import { IconName, IconSize } from './types'
|
||||
import type { IconName, IconSize } from './types'
|
||||
|
||||
export interface ForkAwesomeIconProps {
|
||||
icon: IconName
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
4
src/components/common/links/types.d.ts
vendored
4
src/components/common/links/types.d.ts
vendored
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { extractFrontmatter } from './extract-frontmatter'
|
||||
import { PresentFrontmatterExtractionResult } from './types'
|
||||
import type { PresentFrontmatterExtractionResult } from './types'
|
||||
|
||||
describe('frontmatter extraction', () => {
|
||||
describe('isPresent property', () => {
|
||||
|
|
|
@ -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,})$/
|
||||
|
|
|
@ -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'
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue