Switch to vercel's biome setup (#543)
This commit is contained in:
parent
b8643353c0
commit
43aa1c6e58
52 changed files with 414 additions and 201 deletions
|
|
@ -45,7 +45,7 @@ function findPositionsInDoc(doc: Node, searchText: string): Position | null {
|
|||
|
||||
export function projectWithPositions(
|
||||
doc: Node,
|
||||
suggestions: Array<Suggestion>
|
||||
suggestions: Array<Suggestion>,
|
||||
): Array<UISuggestion> {
|
||||
return suggestions.map((suggestion) => {
|
||||
const positions = findPositionsInDoc(doc, suggestion.originalText);
|
||||
|
|
@ -68,7 +68,7 @@ export function projectWithPositions(
|
|||
|
||||
export function createSuggestionWidget(
|
||||
suggestion: UISuggestion,
|
||||
view: EditorView
|
||||
view: EditorView,
|
||||
): { dom: HTMLElement; destroy: () => void } {
|
||||
const dom = document.createElement('span');
|
||||
const root = createRoot(dom);
|
||||
|
|
@ -90,7 +90,7 @@ export function createSuggestionWidget(
|
|||
state.doc,
|
||||
currentDecorations.find().filter((decoration: Decoration) => {
|
||||
return decoration.spec.suggestionId !== suggestion.id;
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
decorationTransaction.setMeta(suggestionsPluginKey, {
|
||||
|
|
@ -103,7 +103,7 @@ export function createSuggestionWidget(
|
|||
const textTransaction = view.state.tr.replaceWith(
|
||||
suggestion.selectionStart,
|
||||
suggestion.selectionEnd,
|
||||
state.schema.text(suggestion.suggestedText)
|
||||
state.schema.text(suggestion.suggestedText),
|
||||
);
|
||||
|
||||
textTransaction.setMeta('no-debounce', true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue