Commit 275277a7 authored by Jérome Perrin's avatar Jérome Perrin

monaco_editor: prettier version ↑ 2.0.5

parent b9beb439
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<script src="renderjs.js"></script> <script src="renderjs.js"></script>
<script src="jslint.js" type="text/javascript"></script> <script src="jslint.js" type="text/javascript"></script>
<script src="monaco-editor/prettier@1.14.0/standalone.js"></script> <script src="monaco-editor/prettier@2.0.5/standalone.js"></script>
<script src="monaco-editor/prettier@1.14.0/parser-babylon.js"></script> <script src="monaco-editor/prettier@2.0.5/parser-babel.js"></script>
<script> <script>
/* /*
......
...@@ -131,8 +131,8 @@ ...@@ -131,8 +131,8 @@
{ {
provideDocumentFormattingEdits(model, options, token) { provideDocumentFormattingEdits(model, options, token) {
const text = prettier.format(model.getValue(), { const text = prettier.format(model.getValue(), {
parser: 'babylon', parser: 'babel',
plugins: [prettierPlugins.babylon], plugins: [prettierPlugins.babel],
// see http://json.schemastore.org/prettierrc for supported options. // see http://json.schemastore.org/prettierrc for supported options.
singleQuote: true, singleQuote: true,
tabWidth: 2 tabWidth: 2
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>prettier@1.14.0</string> </value> <value> <string>prettier@2.0.5</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
<value> <string>parser-babylon.js</string> </value> <value> <string>parser-babel.js</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>parser-babylon.js</string> </value> <value> <string>parser-babel.js</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
tal:content='python: "window.monacoEditorWebPackResourceBaseUrl = " + modules["json"].dumps(options["portal_url"]) + " + \"/monaco-editor/\""'> tal:content='python: "window.monacoEditorWebPackResourceBaseUrl = " + modules["json"].dumps(options["portal_url"]) + " + \"/monaco-editor/\""'>
</script> </script>
<script tal:attributes="src string:${options/portal_url}/monaco-editor/prettier@1.14.0/standalone.js"></script> <script tal:attributes="src string:${options/portal_url}/monaco-editor/prettier@2.0.5/standalone.js"></script>
<script tal:attributes="src string:${options/portal_url}/monaco-editor/prettier@1.14.0/parser-babylon.js"></script> <script tal:attributes="src string:${options/portal_url}/monaco-editor/prettier@2.0.5/parser-babel.js"></script>
<script charset="utf-8"> <script charset="utf-8">
/* we need to defer import for the monacoEditorWebPackResourceBaseUrl trick to work as expected in ZMI */ /* we need to defer import for the monacoEditorWebPackResourceBaseUrl trick to work as expected in ZMI */
...@@ -149,8 +149,8 @@ $script.onload = function() { ...@@ -149,8 +149,8 @@ $script.onload = function() {
monaco.languages.registerDocumentFormattingEditProvider('javascript', { monaco.languages.registerDocumentFormattingEditProvider('javascript', {
provideDocumentFormattingEdits(model, options, token) { provideDocumentFormattingEdits(model, options, token) {
const text = prettier.format(model.getValue(), { const text = prettier.format(model.getValue(), {
parser: 'babylon', parser: 'babel',
plugins: [prettierPlugins.babylon], plugins: [prettierPlugins.babel],
// see http://json.schemastore.org/prettierrc for supported options. // see http://json.schemastore.org/prettierrc for supported options.
singleQuote: true, singleQuote: true,
tabWidth: 2 tabWidth: 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment