refactor: Use named exports instead of default exports (#2238)

* use named exports instead of default exports

* fix tests

Co-authored-by: Philipp Kühn <philippkuehn@MacBook-Pro-von-Philipp.local>
This commit is contained in:
Philipp Kühn
2021-12-06 12:00:09 +01:00
committed by GitHub
parent fa8318c38f
commit e07a5b625d
123 changed files with 279 additions and 283 deletions

View File

@@ -12,7 +12,7 @@ type AutolinkOptions = {
type: MarkType,
}
export default function autolink(options: AutolinkOptions): Plugin {
export function autolink(options: AutolinkOptions): Plugin {
return new Plugin({
key: new PluginKey('autolink'),
appendTransaction: (transactions, oldState, newState) => {

View File

@@ -6,7 +6,7 @@ type ClickHandlerOptions = {
type: MarkType,
}
export default function clickHandler(options: ClickHandlerOptions): Plugin {
export function clickHandler(options: ClickHandlerOptions): Plugin {
return new Plugin({
key: new PluginKey('handleClickLink'),
props: {

View File

@@ -8,7 +8,7 @@ type PasteHandlerOptions = {
type: MarkType,
}
export default function pasteHandler(options: PasteHandlerOptions): Plugin {
export function pasteHandler(options: PasteHandlerOptions): Plugin {
return new Plugin({
key: new PluginKey('handlePasteLink'),
props: {

View File

@@ -1,8 +1,8 @@
import { Mark, markPasteRule, mergeAttributes } from '@tiptap/core'
import { find } from 'linkifyjs'
import autolink from './helpers/autolink'
import clickHandler from './helpers/clickHandler'
import pasteHandler from './helpers/pasteHandler'
import { autolink } from './helpers/autolink'
import { clickHandler } from './helpers/clickHandler'
import { pasteHandler } from './helpers/pasteHandler'
export interface LinkOptions {
/**