diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..b483bf92
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,7 @@
+/browser-esm-parcel/.cache/
+/browser-esm-parcel/dist/
+/browser-esm-webpack/dist/*.js
+/browser-esm-webpack-monaco-plugin/dist/*.js
+/browser-esm-webpack-small/dist/*.js
+/browser-esm-webpack-typescript/dist/*.js
+/browser-esm-webpack-typescript-react/dist/*.js
diff --git a/.prettierrc b/.prettierrc
index e1b5c6fc..c12f08c5 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -3,5 +3,6 @@
"singleQuote": true,
"trailingComma": "none",
"semi": true,
- "useTabs": true
+ "useTabs": true,
+ "printWidth": 100
}
diff --git a/browser-amd-diff-editor/index.html b/browser-amd-diff-editor/index.html
index dcb6236e..7ff7891b 100644
--- a/browser-amd-diff-editor/index.html
+++ b/browser-amd-diff-editor/index.html
@@ -5,23 +5,16 @@
Monaco Diff Editor Sample
-
+
@@ -17,17 +14,10 @@
require.config({ paths: { vs: '../node_modules/monaco-editor/min/vs' } });
require(['vs/editor/editor.main'], function () {
- var editor = monaco.editor.create(
- document.getElementById('container'),
- {
- value: [
- 'function x() {',
- '\tconsole.log("Hello world!");',
- '}'
- ].join('\n'),
- language: 'javascript'
- }
- );
+ var editor = monaco.editor.create(document.getElementById('container'), {
+ value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
+ language: 'javascript'
+ });
});
diff --git a/browser-amd-iframe/inner.html b/browser-amd-iframe/inner.html
index 30321740..00bb02b3 100644
--- a/browser-amd-iframe/inner.html
+++ b/browser-amd-iframe/inner.html
@@ -20,17 +20,10 @@
require.config({ paths: { vs: '../node_modules/monaco-editor/min/vs' } });
require(['vs/editor/editor.main'], function () {
- var editor = monaco.editor.create(
- document.getElementById('container'),
- {
- value: [
- 'function x() {',
- '\tconsole.log("Hello world!");',
- '}'
- ].join('\n'),
- language: 'javascript'
- }
- );
+ var editor = monaco.editor.create(document.getElementById('container'), {
+ value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
+ language: 'javascript'
+ });
window.onresize = function () {
editor.layout();
diff --git a/browser-amd-localized/index.html b/browser-amd-localized/index.html
index e1c69885..04ccdc92 100644
--- a/browser-amd-localized/index.html
+++ b/browser-amd-localized/index.html
@@ -5,10 +5,7 @@
Monaco Editor Localization Sample
-
+
diff --git a/browser-amd-monarch/index.html b/browser-amd-monarch/index.html
index ada01922..15b13854 100644
--- a/browser-amd-monarch/index.html
+++ b/browser-amd-monarch/index.html
@@ -5,10 +5,7 @@
Monarch Tokenizer Sample
-
+
diff --git a/browser-amd-shadow-dom/index.html b/browser-amd-shadow-dom/index.html
index 3c62c583..8c0a050e 100644
--- a/browser-amd-shadow-dom/index.html
+++ b/browser-amd-shadow-dom/index.html
@@ -14,10 +14,7 @@
Monaco Editor Sample
-
+
@@ -44,9 +41,7 @@
require(['vs/editor/editor.main'], function () {
const editor = monaco.editor.create(innerContainer, {
- value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join(
- '\n'
- ),
+ value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
language: 'javascript'
});
});
diff --git a/browser-amd-shared-model/index.html b/browser-amd-shared-model/index.html
index 40a0064f..5eb7d11c 100644
--- a/browser-amd-shared-model/index.html
+++ b/browser-amd-shared-model/index.html
@@ -5,14 +5,8 @@
Monaco Editor Shared Models Sample
-
-
+
+
diff --git a/browser-esm-parcel/src/index.html b/browser-esm-parcel/src/index.html
index 9516b4ca..a28646bf 100644
--- a/browser-esm-parcel/src/index.html
+++ b/browser-esm-parcel/src/index.html
@@ -4,10 +4,7 @@
-
+
diff --git a/browser-esm-webpack-small/dist/index.html b/browser-esm-webpack-small/dist/index.html
index b9156cee..d149c124 100644
--- a/browser-esm-webpack-small/dist/index.html
+++ b/browser-esm-webpack-small/dist/index.html
@@ -4,10 +4,7 @@
-
+
diff --git a/browser-esm-webpack-small/generate-imports.js b/browser-esm-webpack-small/generate-imports.js
index 6aed395d..0226ee14 100644
--- a/browser-esm-webpack-small/generate-imports.js
+++ b/browser-esm-webpack-small/generate-imports.js
@@ -27,9 +27,7 @@ function getBasicLanguages() {
resolve(
files.map((file) => {
- return file
- .substring('./node_modules/monaco-editor/esm/'.length)
- .replace(/\.js$/, '');
+ return file.substring('./node_modules/monaco-editor/esm/'.length).replace(/\.js$/, '');
})
);
}
@@ -53,14 +51,8 @@ function getAdvancedLanguages() {
resolve(
files
- .map((file) =>
- file.substring(
- './node_modules/monaco-editor/esm/vs/language/'.length
- )
- )
- .map((file) =>
- file.substring(0, file.length - '/monaco.contribution.js'.length)
- )
+ .map((file) => file.substring('./node_modules/monaco-editor/esm/vs/language/'.length))
+ .map((file) => file.substring(0, file.length - '/monaco.contribution.js'.length))
.map((lang) => `vs/language/${lang}/monaco.contribution`)
);
}
@@ -115,18 +107,12 @@ function generateFeatures() {
const files =
fs
.readFileSync(
- path.join(
- __dirname,
- '../node_modules/monaco-editor/esm/vs/editor/edcore.main.js'
- )
+ path.join(__dirname, '../node_modules/monaco-editor/esm/vs/editor/edcore.main.js')
)
.toString() +
fs
.readFileSync(
- path.join(
- __dirname,
- '../node_modules/monaco-editor/esm/vs/editor/editor.all.js'
- )
+ path.join(__dirname, '../node_modules/monaco-editor/esm/vs/editor/editor.all.js')
)
.toString();
files.split(/\r\n|\n/).forEach((line) => {
diff --git a/browser-esm-webpack-typescript-react/src/components/Editor.tsx b/browser-esm-webpack-typescript-react/src/components/Editor.tsx
index 12b46b26..0a89bda3 100644
--- a/browser-esm-webpack-typescript-react/src/components/Editor.tsx
+++ b/browser-esm-webpack-typescript-react/src/components/Editor.tsx
@@ -26,9 +26,7 @@ export const Editor: React.FC = () => {
useEffect(() => {
if (divEl.current) {
editor = monaco.editor.create(divEl.current, {
- value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join(
- '\n'
- ),
+ value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
language: 'typescript'
});
}
diff --git a/browser-esm-webpack-typescript-react/webpack.config.js b/browser-esm-webpack-typescript-react/webpack.config.js
index 8b17f5ba..f70e86b6 100644
--- a/browser-esm-webpack-typescript-react/webpack.config.js
+++ b/browser-esm-webpack-typescript-react/webpack.config.js
@@ -34,14 +34,8 @@ module.exports = {
{
loader: require.resolve('babel-loader'),
options: {
- presets: [
- '@babel/preset-env',
- '@babel/preset-typescript',
- '@babel/preset-react'
- ],
- plugins: [
- isDevelopment && require.resolve('react-refresh/babel')
- ].filter(Boolean)
+ presets: ['@babel/preset-env', '@babel/preset-typescript', '@babel/preset-react'],
+ plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean)
}
}
]
diff --git a/browser-esm-webpack/dist/index.html b/browser-esm-webpack/dist/index.html
index b9156cee..d149c124 100644
--- a/browser-esm-webpack/dist/index.html
+++ b/browser-esm-webpack/dist/index.html
@@ -4,10 +4,7 @@
-
+
diff --git a/browser-script-editor/index.html b/browser-script-editor/index.html
index 4b112848..ea46101f 100644
--- a/browser-script-editor/index.html
+++ b/browser-script-editor/index.html
@@ -10,10 +10,7 @@
Monaco Editor Sync Loading Sample
-
+
diff --git a/electron-amd-nodeIntegration/electron-index.html b/electron-amd-nodeIntegration/electron-index.html
index 550f10eb..a3985dd9 100644
--- a/electron-amd-nodeIntegration/electron-index.html
+++ b/electron-amd-nodeIntegration/electron-index.html
@@ -4,16 +4,13 @@
Monaco Editor!
Monaco Editor in Electron!
-
+
diff --git a/electron-amd-nodeIntegration/index.html b/electron-amd-nodeIntegration/index.html
index 1eba16a7..4521147b 100644
--- a/electron-amd-nodeIntegration/index.html
+++ b/electron-amd-nodeIntegration/index.html
@@ -7,9 +7,7 @@
Monaco Editor Electron Sample
To run this sample, you need to
- download Electron
+ download Electron
and then execute:
diff --git a/electron-amd/electron-index.html b/electron-amd/electron-index.html
index c691f629..72210afb 100644
--- a/electron-amd/electron-index.html
+++ b/electron-amd/electron-index.html
@@ -4,7 +4,7 @@
Monaco Editor!