improve eslint config
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { InputRule } from 'prosemirror-inputrules'
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
|
||||
export default function (regexp: RegExp, type: NodeType, getAttrs?: Function) {
|
||||
export default function (regexp: RegExp, type: NodeType, getAttrs?: (match: any) => any): InputRule {
|
||||
return new InputRule(regexp, (state, match, start, end) => {
|
||||
const attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs
|
||||
const { tr } = state
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Plugin } from 'prosemirror-state'
|
||||
import { Slice, Fragment, MarkType } from 'prosemirror-model'
|
||||
|
||||
export default function (regexp: RegExp, type: MarkType, getAttrs?: Function) {
|
||||
export default function (regexp: RegExp, type: MarkType, getAttrs?: (match: any) => any): Plugin {
|
||||
|
||||
const handler = (fragment: Fragment, parent?: any) => {
|
||||
const nodes: any[] = []
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function capitalize(value: string = ''): string {
|
||||
export default function capitalize(value = ''): string {
|
||||
return value.charAt(0).toUpperCase() + value.slice(1)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function minMax(value: number = 0, min: number = 0, max: number = 0): number {
|
||||
export default function minMax(value = 0, min = 0, max = 0): number {
|
||||
return Math.min(Math.max(value, min), max)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user