@bhsd/codemirror-mediawiki
Version:
Modified CodeMirror mode based on wikimedia/mediawiki-extensions-CodeMirror
19 lines (18 loc) • 1.08 kB
TypeScript
import type { EditorView } from '@codemirror/view';
import type { EditorState, Text } from '@codemirror/state';
import type { Language } from '@codemirror/language';
import type { Diagnostic } from '@codemirror/lint';
import type { Option, LiveOption } from './linter';
export type LintSource = ((state: EditorState) => Diagnostic[] | Promise<Diagnostic[]>) & {
delay?: number;
fixer?: (doc: Text, rule?: string) => string | Promise<string>;
};
export type LintSources = LintSource | [LintSource] | [LintSource, LintSource];
export type LintSourceGetter = (opt?: Option | LiveOption, view?: EditorView, nestedMWLanguage?: Language) => LintSource | Promise<LintSource>;
export declare const getWikiLintSource: LintSourceGetter;
export declare const getJsLintSource: LintSourceGetter;
export declare const getCssLintSource: LintSourceGetter;
export declare const getVueLintSource: LintSourceGetter;
export declare const getHTMLLintSource: LintSourceGetter;
export declare const getJsonLintSource: LintSourceGetter;
export declare const getLuaLintSource: LintSourceGetter;