Skip to content

Commit 7c81cfc

Browse files
committed
Prettier
1 parent 4685573 commit 7c81cfc

File tree

892 files changed

+29379
-7339
lines changed

Some content is hidden

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

892 files changed

+29379
-7339
lines changed

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
singleQuote: true,
3-
printWidth: 180,
3+
printWidth: 120,
44
tabWidth: 4,
55
overrides: [
66
{

build/ci/performance/checkPerformanceResults.js

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ const path = require('path');
77
const constants = require('../../constants');
88

99
const xmlFile = path.join(constants.ExtensionRootDir, 'test-results.xml');
10-
const performanceResultsFile = path.join(constants.ExtensionRootDir, 'build', 'ci', 'performance', 'performance-results.json');
10+
const performanceResultsFile = path.join(
11+
constants.ExtensionRootDir,
12+
'build',
13+
'ci',
14+
'performance',
15+
'performance-results.json'
16+
);
1117
const errorMargin = 0.01;
1218
let failedTests = '';
1319

@@ -40,12 +46,29 @@ fs.readFile(xmlFile, 'utf8', (xmlFileError, xmlData) => {
4046

4147
// compare the average result to the base JSON
4248
if (testcase && avg > parseFloat(testcase.time) + errorMargin) {
43-
failedTests += 'Performance is slow in: ' + testcase.name + ', Benchmark time: ' + testcase.time + ', Average test time: ' + avg + '\n';
49+
failedTests +=
50+
'Performance is slow in: ' +
51+
testcase.name +
52+
', Benchmark time: ' +
53+
testcase.time +
54+
', Average test time: ' +
55+
avg +
56+
'\n';
4457
}
4558
} else {
4659
// compare the average result to the base JSON
47-
if (suite.testcase.name === result.name && avg > parseFloat(suite.testcase.time) + errorMargin) {
48-
failedTests += 'Performance is slow in: ' + testcase.name + ', Benchmark time: ' + testcase.time + ', Average test time: ' + avg + '\n';
60+
if (
61+
suite.testcase.name === result.name &&
62+
avg > parseFloat(suite.testcase.time) + errorMargin
63+
) {
64+
failedTests +=
65+
'Performance is slow in: ' +
66+
testcase.name +
67+
', Benchmark time: ' +
68+
testcase.time +
69+
', Average test time: ' +
70+
avg +
71+
'\n';
4972
}
5073
}
5174
}

build/ci/postInstall.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ var constants_1 = require('../constants');
1414
* The solution is to modify the type definition file after `npm install`.
1515
*/
1616
function fixJupyterLabDTSFiles() {
17-
var relativePath = path.join('node_modules', '@jupyterlab', 'services', 'node_modules', '@jupyterlab', 'coreutils', 'lib', 'settingregistry.d.ts');
17+
var relativePath = path.join(
18+
'node_modules',
19+
'@jupyterlab',
20+
'services',
21+
'node_modules',
22+
'@jupyterlab',
23+
'coreutils',
24+
'lib',
25+
'settingregistry.d.ts'
26+
);
1827
var filePath = path.join(constants_1.ExtensionRootDir, relativePath);
1928
if (!fs.existsSync(filePath)) {
2029
throw new Error("Type Definition file from JupyterLab not found '" + filePath + "' (pvsc post install script)");

build/webpack/loaders/fixNodeFetch.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
const path = require('path');
77
const constants = require('../../constants');
88

9-
const nodeFetchIndexFile = path.join(constants.ExtensionRootDir, 'node_modules', '@jupyterlab', 'services', 'node_modules', 'node-fetch', 'lib', 'index.js');
9+
const nodeFetchIndexFile = path.join(
10+
constants.ExtensionRootDir,
11+
'node_modules',
12+
'@jupyterlab',
13+
'services',
14+
'node_modules',
15+
'node-fetch',
16+
'lib',
17+
'index.js'
18+
);
1019
// On windows replace `\` with `\\`, else we get an error in webpack (Module parse failed: Octal literal in strict mode).
1120
const nodeFetchFile = constants.isWindows ? nodeFetchIndexFile.replace(/\\/g, '\\\\') : nodeFetchIndexFile;
1221

build/webpack/plugins/less-plugin-base64.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ class Base64Visitor {
3232
visitUrl(URLNode, visitArgs) {
3333
// Return two new nodes in the call. One that has the mime type and other with the node. The data-uri
3434
// evaluator will transform this into a base64 string
35-
return new less.tree.Call('data-uri', [new Base64MimeTypeNode(), URLNode.value], URLNode.index || 0, URLNode.currentFileInfo);
35+
return new less.tree.Call(
36+
'data-uri',
37+
[new Base64MimeTypeNode(), URLNode.value],
38+
URLNode.index || 0,
39+
URLNode.currentFileInfo
40+
);
3641
}
3742
}
3843
/*

build/webpack/webpack.datascience-ui.config.builder.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ function buildConfiguration(isNotebook) {
129129
// `module.resource` contains the absolute path of the file on disk.
130130
// Look for `node_modules/monaco...`.
131131
const path = require('path');
132-
return module.resource && module.resource.includes(`${path.sep}node_modules${path.sep}@nteract`);
132+
return (
133+
module.resource &&
134+
module.resource.includes(`${path.sep}node_modules${path.sep}@nteract`)
135+
);
133136
}
134137
},
135138
// Bundling `plotly` with nteract isn't the best option, as this plotly alone is 6mb.
@@ -142,7 +145,9 @@ function buildConfiguration(isNotebook) {
142145
// `module.resource` contains the absolute path of the file on disk.
143146
// Look for `node_modules/monaco...`.
144147
const path = require('path');
145-
return module.resource && module.resource.includes(`${path.sep}node_modules${path.sep}plotly`);
148+
return (
149+
module.resource && module.resource.includes(`${path.sep}node_modules${path.sep}plotly`)
150+
);
146151
}
147152
},
148153
// Monaco is a monster. For SSH again, we pull this into a seprate bundle.
@@ -157,7 +162,9 @@ function buildConfiguration(isNotebook) {
157162
// `module.resource` contains the absolute path of the file on disk.
158163
// Look for `node_modules/monaco...`.
159164
const path = require('path');
160-
return module.resource && module.resource.includes(`${path.sep}node_modules${path.sep}monaco`);
165+
return (
166+
module.resource && module.resource.includes(`${path.sep}node_modules${path.sep}monaco`)
167+
);
161168
}
162169
}
163170
}

build/webpack/webpack.extension.dependencies.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ const config = {
4343
// 'find' the calling extension.
4444
new copyWebpackPlugin([{ from: './package.json', to: '.' }]),
4545
// onigasm requires our onigasm.wasm to be in node_modules
46-
new copyWebpackPlugin([{ from: './node_modules/onigasm/lib/onigasm.wasm', to: './node_modules/onigasm/lib/onigasm.wasm' }])
46+
new copyWebpackPlugin([
47+
{ from: './node_modules/onigasm/lib/onigasm.wasm', to: './node_modules/onigasm/lib/onigasm.wasm' }
48+
])
4749
],
4850
resolve: {
4951
alias: {

experiments.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[
32
{
43
"name": "AlwaysDisplayTestExplorer - experiment",
@@ -115,4 +114,3 @@
115114
"max": 100
116115
}
117116
]
118-

0 commit comments

Comments
 (0)