From 1431f4561fd7d70f9604691b935d2d8b902fb7ee Mon Sep 17 00:00:00 2001 From: Fizz Pang Date: Sun, 12 Mar 2023 15:47:52 +0800 Subject: [PATCH] feat: prettier --- .../line-and-inline-decorations/sample.js | 26 +++++++++---------- .../listening-to-mouse-events/sample.js | 20 +++++++------- .../rendering-glyphs-in-the-margin/sample.js | 20 +++++++------- 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.js b/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.js index edef623d..16c7c385 100644 --- a/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.js +++ b/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.js @@ -15,18 +15,16 @@ var editor = monaco.editor.create(document.getElementById("container"), { language: "javascript", }); -var decorations = editor.createDecorationsCollection( - [ - { - range: new monaco.Range(3, 1, 5, 1), - options: { - isWholeLine: true, - linesDecorationsClassName: "myLineDecoration", - }, +var decorations = editor.createDecorationsCollection([ + { + range: new monaco.Range(3, 1, 5, 1), + options: { + isWholeLine: true, + linesDecorationsClassName: "myLineDecoration", }, - { - range: new monaco.Range(7, 1, 7, 24), - options: { inlineClassName: "myInlineDecoration" }, - }, - ] -); + }, + { + range: new monaco.Range(7, 1, 7, 24), + options: { inlineClassName: "myInlineDecoration" }, + }, +]); diff --git a/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.js b/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.js index 60102177..d39e2206 100644 --- a/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.js +++ b/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.js @@ -17,18 +17,16 @@ var editor = monaco.editor.create(document.getElementById("container"), { contextmenu: false, }); -var decorations = editor.createDecorationsCollection( - [ - { - range: new monaco.Range(3, 1, 3, 1), - options: { - isWholeLine: true, - className: "myContentClass", - glyphMarginClassName: "myGlyphMarginClass", - }, +var decorations = editor.createDecorationsCollection([ + { + range: new monaco.Range(3, 1, 3, 1), + options: { + isWholeLine: true, + className: "myContentClass", + glyphMarginClassName: "myGlyphMarginClass", }, - ] -); + }, +]); // Add a zone to make hit testing more interesting var viewZoneId = null; diff --git a/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.js b/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.js index ed886c47..fead9185 100644 --- a/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.js +++ b/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.js @@ -16,17 +16,15 @@ var editor = monaco.editor.create(document.getElementById("container"), { glyphMargin: true, }); -var decorations = editor.createDecorationsCollection( - [ - { - range: new monaco.Range(3, 1, 3, 1), - options: { - isWholeLine: true, - className: "myContentClass", - glyphMarginClassName: "myGlyphMarginClass", - }, +var decorations = editor.createDecorationsCollection([ + { + range: new monaco.Range(3, 1, 3, 1), + options: { + isWholeLine: true, + className: "myContentClass", + glyphMarginClassName: "myGlyphMarginClass", }, - ] -); + }, +]); // You can now use `decorations` to change or remove the decoration