improve eslint config

This commit is contained in:
Philipp Kühn
2020-09-25 13:52:17 +02:00
parent e10b52aafc
commit 21c82c2cfa
6 changed files with 13 additions and 5 deletions

View File

@@ -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