Fix all biome linter errors (#541)
This commit is contained in:
parent
f23c73f6a5
commit
e5d654bf41
46 changed files with 317 additions and 275 deletions
|
|
@ -1,14 +1,14 @@
|
|||
'use client';
|
||||
|
||||
import { defaultMarkdownSerializer } from 'prosemirror-markdown';
|
||||
import { DOMParser, Node } from 'prosemirror-model';
|
||||
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view';
|
||||
import { DOMParser, type Node } from 'prosemirror-model';
|
||||
import { Decoration, DecorationSet, type EditorView } from 'prosemirror-view';
|
||||
import { renderToString } from 'react-dom/server';
|
||||
|
||||
import { Markdown } from '@/components/markdown';
|
||||
|
||||
import { documentSchema } from './config';
|
||||
import { createSuggestionWidget, UISuggestion } from './suggestions';
|
||||
import { createSuggestionWidget, type UISuggestion } from './suggestions';
|
||||
|
||||
export const buildDocumentFromContent = (content: string) => {
|
||||
const parser = DOMParser.fromSchema(documentSchema);
|
||||
|
|
@ -28,7 +28,7 @@ export const createDecorations = (
|
|||
) => {
|
||||
const decorations: Array<Decoration> = [];
|
||||
|
||||
suggestions.forEach((suggestion) => {
|
||||
for (const suggestion of suggestions) {
|
||||
decorations.push(
|
||||
Decoration.inline(
|
||||
suggestion.selectionStart,
|
||||
|
|
@ -56,7 +56,7 @@ export const createDecorations = (
|
|||
}
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
return DecorationSet.create(view.state.doc, decorations);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue