Skip to content

Commit 84bdc31

Browse files
committed
run prettier
1 parent b4178b1 commit 84bdc31

File tree

217 files changed

+22469
-198818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+22469
-198818
lines changed

.prettierignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/monaco-css/out/
2+
/monaco-css/release/
3+
/monaco-editor-samples/browser-esm-parcel/.cache/
4+
/monaco-editor-samples/browser-esm-parcel/dist/
5+
/monaco-editor-samples/browser-esm-webpack/dist/*.js
6+
/monaco-editor-samples/browser-esm-webpack-monaco-plugin/dist/*.js
7+
/monaco-editor-samples/browser-esm-webpack-small/dist/*.js
8+
/monaco-editor-samples/browser-esm-webpack-typescript/dist/*.js
9+
/monaco-editor-samples/browser-esm-webpack-typescript-react/dist/*.js
10+
/monaco-editor/test/samples-all.generated.js
11+
/monaco-editor/test/playground.generated/
12+
/monaco-editor/typedoc/theme/
13+
/monaco-editor/typedoc/monaco.d.ts
14+
/monaco-editor/website/lib/
15+
/monaco-html/out/
16+
/monaco-html/release/
17+
/monaco-json/out/
18+
/monaco-json/release/
19+
/monaco-languages/out/
20+
/monaco-languages/release/
21+
/monaco-typescript/out/
22+
/monaco-typescript/release/
23+
/monaco-typescript/src/lib/
File renamed without changes.

CHANGELOG.md

+1,323-1,257
Large diffs are not rendered by default.

CONTRIBUTING.md

+187-184
Large diffs are not rendered by default.

LICENSE.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
The MIT License (MIT)
2-
3-
Copyright (c) 2016 - present Microsoft Corporation
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 - present Microsoft Corporation
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+97-96
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,97 @@
1-
# Monaco Editor
2-
3-
[![Build Status](https://dev.azure.com/ms/monaco-editor/_apis/build/status/microsoft.monaco-editor?label=website)](https://dev.azure.com/ms/monaco-editor/_build/latest?definitionId=3)
4-
5-
The Monaco Editor is the code editor which powers [VS Code](https://github.com/Microsoft/vscode), with the features better described [here](https://code.visualstudio.com/docs/editor/editingevolved).
6-
7-
Please note that this repository contains no source code for the code editor, it only contains the scripts to package everything together and ship the `monaco-editor` npm module.
8-
9-
![image](https://user-images.githubusercontent.com/5047891/94183711-290c0780-fea3-11ea-90e3-c88ff9d21bd6.png)
10-
11-
## Try it out
12-
13-
Try the editor out [on our website](https://microsoft.github.io/monaco-editor/index.html).
14-
15-
## Installing
16-
17-
```
18-
$ npm install monaco-editor
19-
```
20-
21-
You will get:
22-
* inside `esm`: ESM version of the editor (compatible with e.g. webpack)
23-
* inside `dev`: AMD bundled, not minified
24-
* inside `min`: AMD bundled, and minified
25-
* inside `min-maps`: source maps for `min`
26-
* `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).
27-
28-
It is recommended to develop against the `dev` version, and in production to use the `min` version.
29-
30-
## Documentation
31-
32-
* Learn how to integrate the editor with these [complete samples](https://github.com/Microsoft/monaco-editor-samples/).
33-
* [Integrate the AMD version](./monaco-editor/docs/integrate-amd.md).
34-
* [Integrate the AMD version cross-domain](./monaco-editor/docs/integrate-amd-cross.md)
35-
* [Integrate the ESM version](./monaco-editor/docs/integrate-esm.md)
36-
* Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html).
37-
* Explore the [API docs](https://microsoft.github.io/monaco-editor/api/index.html) or read them straight from [`monaco.d.ts`](https://github.com/Microsoft/monaco-editor/blob/master/website/playground/monaco.d.ts.txt).
38-
* Read [this guide](https://github.com/Microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators) to ensure the editor is accessible to all your users!
39-
* Create a Monarch tokenizer for a new programming language [in the Monarch playground](https://microsoft.github.io/monaco-editor/monarch.html).
40-
* Ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor)! Search open and closed issues, there are a lot of tips in there!
41-
42-
## Issues
43-
44-
Create [issues](https://github.com/Microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Always mention **the version** of the editor when creating issues and **the browser** you're having trouble in. Please search for existing issues to avoid duplicates.
45-
46-
## FAQ
47-
48-
**What is the relationship between VS Code and the Monaco Editor?**
49-
50-
The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home.
51-
52-
**What is the relationship between VS Code's version and the Monaco Editor's version?**
53-
54-
None. The Monaco Editor is a library and it reflects directly the source code.
55-
56-
**I've written an extension for VS Code, will it work on the Monaco Editor in a browser?**
57-
58-
No.
59-
60-
> Note: If the extension is fully based on the [LSP](https://microsoft.github.io/language-server-protocol/) and if the language server is authored in JavaScript, then it would be possible.
61-
62-
**Why all these web workers and why should I care?**
63-
64-
Language services create web workers to compute heavy stuff outside of the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case).
65-
66-
**What is this `loader.js`? Can I use `require.js`?**
67-
68-
It is an AMD loader that we use in VS Code. Yes.
69-
70-
**I see the warning "Could not create web worker". What should I do?**
71-
72-
HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes. Please also see the cross-domain case above.
73-
74-
**Is the editor supported in mobile browsers or mobile web app frameworks?**
75-
76-
No.
77-
78-
**Why doesn't the editor support TextMate grammars?**
79-
80-
* Please see https://github.com/bolinfest/monaco-tm which puts together `monaco-editor`, `vscode-oniguruma` and `vscode-textmate` to get TM grammar support in the editor.
81-
82-
**What about IE 11 support?**
83-
84-
* The Monaco Editor no longer supports IE 11. The last version that was tested on IE 11 is `0.18.1`.
85-
86-
## Development setup
87-
88-
Please see [CONTRIBUTING](./CONTRIBUTING.md)
89-
90-
## Code of Conduct
91-
92-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
93-
94-
95-
## License
96-
Licensed under the [MIT](https://github.com/Microsoft/monaco-editor/blob/master/LICENSE.md) License.
1+
# Monaco Editor
2+
3+
[![Build Status](https://dev.azure.com/ms/monaco-editor/_apis/build/status/microsoft.monaco-editor?label=website)](https://dev.azure.com/ms/monaco-editor/_build/latest?definitionId=3)
4+
5+
The Monaco Editor is the code editor which powers [VS Code](https://github.com/Microsoft/vscode), with the features better described [here](https://code.visualstudio.com/docs/editor/editingevolved).
6+
7+
Please note that this repository contains no source code for the code editor, it only contains the scripts to package everything together and ship the `monaco-editor` npm module.
8+
9+
![image](https://user-images.githubusercontent.com/5047891/94183711-290c0780-fea3-11ea-90e3-c88ff9d21bd6.png)
10+
11+
## Try it out
12+
13+
Try the editor out [on our website](https://microsoft.github.io/monaco-editor/index.html).
14+
15+
## Installing
16+
17+
```
18+
$ npm install monaco-editor
19+
```
20+
21+
You will get:
22+
23+
- inside `esm`: ESM version of the editor (compatible with e.g. webpack)
24+
- inside `dev`: AMD bundled, not minified
25+
- inside `min`: AMD bundled, and minified
26+
- inside `min-maps`: source maps for `min`
27+
- `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).
28+
29+
It is recommended to develop against the `dev` version, and in production to use the `min` version.
30+
31+
## Documentation
32+
33+
- Learn how to integrate the editor with these [complete samples](https://github.com/Microsoft/monaco-editor-samples/).
34+
- [Integrate the AMD version](./monaco-editor/docs/integrate-amd.md).
35+
- [Integrate the AMD version cross-domain](./monaco-editor/docs/integrate-amd-cross.md)
36+
- [Integrate the ESM version](./monaco-editor/docs/integrate-esm.md)
37+
- Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html).
38+
- Explore the [API docs](https://microsoft.github.io/monaco-editor/api/index.html) or read them straight from [`monaco.d.ts`](https://github.com/Microsoft/monaco-editor/blob/master/website/playground/monaco.d.ts.txt).
39+
- Read [this guide](https://github.com/Microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators) to ensure the editor is accessible to all your users!
40+
- Create a Monarch tokenizer for a new programming language [in the Monarch playground](https://microsoft.github.io/monaco-editor/monarch.html).
41+
- Ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor)! Search open and closed issues, there are a lot of tips in there!
42+
43+
## Issues
44+
45+
Create [issues](https://github.com/Microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Always mention **the version** of the editor when creating issues and **the browser** you're having trouble in. Please search for existing issues to avoid duplicates.
46+
47+
## FAQ
48+
49+
**What is the relationship between VS Code and the Monaco Editor?**
50+
51+
The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home.
52+
53+
**What is the relationship between VS Code's version and the Monaco Editor's version?**
54+
55+
None. The Monaco Editor is a library and it reflects directly the source code.
56+
57+
**I've written an extension for VS Code, will it work on the Monaco Editor in a browser?**
58+
59+
No.
60+
61+
> Note: If the extension is fully based on the [LSP](https://microsoft.github.io/language-server-protocol/) and if the language server is authored in JavaScript, then it would be possible.
62+
63+
**Why all these web workers and why should I care?**
64+
65+
Language services create web workers to compute heavy stuff outside of the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case).
66+
67+
**What is this `loader.js`? Can I use `require.js`?**
68+
69+
It is an AMD loader that we use in VS Code. Yes.
70+
71+
**I see the warning "Could not create web worker". What should I do?**
72+
73+
HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes. Please also see the cross-domain case above.
74+
75+
**Is the editor supported in mobile browsers or mobile web app frameworks?**
76+
77+
No.
78+
79+
**Why doesn't the editor support TextMate grammars?**
80+
81+
- Please see https://github.com/bolinfest/monaco-tm which puts together `monaco-editor`, `vscode-oniguruma` and `vscode-textmate` to get TM grammar support in the editor.
82+
83+
**What about IE 11 support?**
84+
85+
- The Monaco Editor no longer supports IE 11. The last version that was tested on IE 11 is `0.18.1`.
86+
87+
## Development setup
88+
89+
Please see [CONTRIBUTING](./CONTRIBUTING.md)
90+
91+
## Code of Conduct
92+
93+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
94+
95+
## License
96+
97+
Licensed under the [MIT](https://github.com/Microsoft/monaco-editor/blob/master/LICENSE.md) License.

SECURITY.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44

55
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
66

7-
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](<https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)>), please report it to us as described below.
88

99
## Reporting Security Issues
1010

1111
**Please do not report security vulnerabilities through public GitHub issues.**
1212

1313
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
1414

15-
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
1616

1717
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
1818

1919
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
2020

21-
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22-
* Full paths of source file(s) related to the manifestation of the issue
23-
* The location of the affected source code (tag/branch/commit or direct URL)
24-
* Any special configuration required to reproduce the issue
25-
* Step-by-step instructions to reproduce the issue
26-
* Proof-of-concept or exploit code (if possible)
27-
* Impact of the issue, including how an attacker might exploit the issue
21+
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22+
- Full paths of source file(s) related to the manifestation of the issue
23+
- The location of the affected source code (tag/branch/commit or direct URL)
24+
- Any special configuration required to reproduce the issue
25+
- Step-by-step instructions to reproduce the issue
26+
- Proof-of-concept or exploit code (if possible)
27+
- Impact of the issue, including how an attacker might exploit the issue
2828

2929
This information will help us triage your report more quickly.
3030

monaco-css/.prettierignore

-2
This file was deleted.

monaco-css/monaco.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
/// <reference path="node_modules/monaco-editor-core/monaco.d.ts" />
6+
/// <reference path="../node_modules/monaco-editor-core/monaco.d.ts" />
77

88
declare namespace monaco.languages.css {
99
export interface Options {

monaco-css/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"scripts": {
33
"compile": "../node_modules/.bin/mrmdir ./out && ../node_modules/.bin/tsc -p ./src/tsconfig.json && ../node_modules/.bin/tsc -p ./src/tsconfig.esm.json && node ./scripts/dts && ../node_modules/.bin/prettier --write ./monaco.d.ts",
44
"watch": "../node_modules/.bin/tsc -p ./src --watch",
5-
"prepublishOnly": "../node_modules/.bin/mrmdir ./release && npm run compile && node ./scripts/release.js && node ./scripts/bundle && ../node_modules/.bin/mcopy ./monaco.d.ts ./release/monaco.d.ts && ../node_modules/.bin/mcopy ./out/esm/monaco.contribution.d.ts ./release/esm/monaco.contribution.d.ts && ../node_modules/.bin/mcopy ./out/esm/fillers/monaco-editor-core.d.ts ./release/esm/fillers/monaco-editor-core.d.ts",
6-
"prettier": "../node_modules/.bin/prettier --write ."
5+
"prepublishOnly": "../node_modules/.bin/mrmdir ./release && npm run compile && node ./scripts/release.js && node ./scripts/bundle && ../node_modules/.bin/mcopy ./monaco.d.ts ./release/monaco.d.ts && ../node_modules/.bin/mcopy ./out/esm/monaco.contribution.d.ts ./release/esm/monaco.contribution.d.ts && ../node_modules/.bin/mcopy ./out/esm/fillers/monaco-editor-core.d.ts ./release/esm/fillers/monaco-editor-core.d.ts"
76
}
87
}

monaco-css/scripts/dts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let result = [
2020
` * Licensed under the MIT License. See License.txt in the project root for license information.`,
2121
` *--------------------------------------------------------------------------------------------*/`,
2222
``,
23-
`/// <reference path="node_modules/monaco-editor-core/monaco.d.ts" />`,
23+
`/// <reference path="../node_modules/monaco-editor-core/monaco.d.ts" />`,
2424
``,
2525
`declare namespace monaco.languages.css {`
2626
];

monaco-css/src/cssWorker.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ export class CSSWorker {
2929
customDataProviders.push(cssService.newCSSDataProvider(data.dataProviders[id]));
3030
}
3131
}
32-
const lsOptions: cssService.LanguageServiceOptions = { customDataProviders, useDefaultDataProvider };
32+
const lsOptions: cssService.LanguageServiceOptions = {
33+
customDataProviders,
34+
useDefaultDataProvider
35+
};
3336

3437
switch (this._languageId) {
3538
case 'css':
@@ -173,7 +176,7 @@ export class CSSWorker {
173176

174177
export interface ICreateData {
175178
languageId: string;
176-
options: Options
179+
options: Options;
177180
}
178181

179182
export function create(ctx: worker.IWorkerContext, createData: ICreateData): CSSWorker {

0 commit comments

Comments
 (0)