Fix all biome linter errors (#541)

This commit is contained in:
Jared Palmer 2024-11-15 12:18:17 -05:00 committed by GitHub
parent f23c73f6a5
commit e5d654bf41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 317 additions and 275 deletions

View file

@ -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);
};