Skip to content

Commit a7a6ea5

Browse files
authored
chore(various): Autoformat JS files (#4726)
This applies the autoformatter to all of the JS (as in, written originally in JS, not transpiled into JS) files in the repo, to avoid having future changes to those files polluted by irrelevant autoformating triggered by saving the file. A few non-JS files, primarily in the ember package, are also included.
1 parent f7e2796 commit a7a6ea5

Some content is hidden

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

59 files changed

+1372
-1854
lines changed

.eslintrc.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ module.exports = {
1010
ecmaVersion: 2018,
1111
},
1212
extends: ['@sentry-internal/sdk'],
13-
ignorePatterns: ['coverage/**', 'build/**', 'dist/**', 'esm/**', 'examples/**', 'scripts/**', 'test/manual/**'],
13+
ignorePatterns: [
14+
'coverage/**',
15+
'build/**',
16+
'dist/**',
17+
'esm/**',
18+
'examples/**',
19+
'scripts/**',
20+
'test/manual/**',
21+
'types/**',
22+
],
1423
overrides: [
1524
{
1625
files: ['*.ts', '*.tsx', '*.d.ts'],

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ package. Please refer to the README and instructions of those SDKs for more deta
5252
- [`@sentry/node`](https://github.com/getsentry/sentry-javascript/tree/master/packages/node): SDK for Node, including
5353
integrations for Express, Koa, Loopback, Sails and Connect
5454
- [`@sentry/angular`](https://github.com/getsentry/sentry-javascript/tree/master/packages/angular): browser SDK with Angular integration enabled
55-
- [`@sentry/react`](https://github.com/getsentry/sentry-javascript/tree/master/packages/react): browser SDK with React integration enabled
55+
- [`@sentry/react`](https://github.com/getsentry/sentry-javascript/tree/master/packages/react): browser SDK with React integration enabled
5656
- [`@sentry/ember`](https://github.com/getsentry/sentry-javascript/tree/master/packages/ember): browser SDK with Ember integration enabled
5757
- [`@sentry/vue`](https://github.com/getsentry/sentry-javascript/tree/master/packages/vue): browser SDK with Vue integration enabled
5858
- [`@sentry/gatsby`](https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby): SDK for Gatsby
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2+
"arrowParens": "avoid",
3+
"printWidth": 120,
4+
"proseWrap": "always",
5+
"singleQuote": true,
26
"trailingComma": "es5"
37
}

packages/browser/test/integration/browsers.js

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,83 +3,83 @@
33

44
module.exports = {
55
bs_android_4: {
6-
base: "BrowserStack",
7-
browser: "Android Browser",
8-
device: "Samsung Galaxy Note 4",
9-
os: "android",
10-
os_version: "4.4",
6+
base: 'BrowserStack',
7+
browser: 'Android Browser',
8+
device: 'Samsung Galaxy Note 4',
9+
os: 'android',
10+
os_version: '4.4',
1111
real_mobile: true,
1212
browser_version: null,
1313
},
1414
bs_android_5: {
15-
base: "BrowserStack",
16-
browser: "Android Browser",
17-
device: "Samsung Galaxy S6",
18-
os: "android",
19-
os_version: "5.0",
15+
base: 'BrowserStack',
16+
browser: 'Android Browser',
17+
device: 'Samsung Galaxy S6',
18+
os: 'android',
19+
os_version: '5.0',
2020
real_mobile: true,
2121
browser_version: null,
2222
},
2323
bs_android_6: {
24-
base: "BrowserStack",
25-
browser: "Android Browser",
26-
device: "Google Nexus 6",
27-
os: "android",
28-
os_version: "6.0",
24+
base: 'BrowserStack',
25+
browser: 'Android Browser',
26+
device: 'Google Nexus 6',
27+
os: 'android',
28+
os_version: '6.0',
2929
real_mobile: true,
3030
browser_version: null,
3131
},
3232
bs_android_7: {
33-
base: "BrowserStack",
34-
browser: "Android Browser",
35-
device: "Samsung Galaxy Note 8",
36-
os: "android",
37-
os_version: "7.1",
33+
base: 'BrowserStack',
34+
browser: 'Android Browser',
35+
device: 'Samsung Galaxy Note 8',
36+
os: 'android',
37+
os_version: '7.1',
3838
real_mobile: true,
3939
browser_version: null,
4040
},
4141
bs_android_8: {
42-
base: "BrowserStack",
43-
browser: "Android Browser",
44-
device: "Samsung Galaxy Note 9",
45-
os: "android",
46-
os_version: "8.1",
42+
base: 'BrowserStack',
43+
browser: 'Android Browser',
44+
device: 'Samsung Galaxy Note 9',
45+
os: 'android',
46+
os_version: '8.1',
4747
real_mobile: true,
4848
browser_version: null,
4949
},
5050
bs_android_9: {
51-
base: "BrowserStack",
52-
browser: "Android Browser",
53-
device: "Samsung Galaxy Note 10 Plus",
54-
os: "android",
55-
os_version: "9.0",
51+
base: 'BrowserStack',
52+
browser: 'Android Browser',
53+
device: 'Samsung Galaxy Note 10 Plus',
54+
os: 'android',
55+
os_version: '9.0',
5656
real_mobile: true,
5757
browser_version: null,
5858
},
5959
bs_android_10: {
60-
base: "BrowserStack",
61-
browser: "Android Browser",
62-
device: "Google Pixel 4 XL",
63-
os: "android",
64-
os_version: "10.0",
60+
base: 'BrowserStack',
61+
browser: 'Android Browser',
62+
device: 'Google Pixel 4 XL',
63+
os: 'android',
64+
os_version: '10.0',
6565
real_mobile: true,
6666
browser_version: null,
6767
},
6868
bs_ios_12: {
69-
base: "BrowserStack",
70-
browser: "Mobile Safari",
71-
device: "iPhone XS",
72-
os: "ios",
73-
os_version: "12",
69+
base: 'BrowserStack',
70+
browser: 'Mobile Safari',
71+
device: 'iPhone XS',
72+
os: 'ios',
73+
os_version: '12',
7474
real_mobile: true,
7575
browser_version: null,
7676
},
7777
bs_ios_13: {
78-
base: "BrowserStack",
79-
browser: "Mobile Safari",
80-
device: "iPhone 11",
81-
os: "ios",
82-
os_version: "13",
78+
base: 'BrowserStack',
79+
browser: 'Mobile Safari',
80+
device: 'iPhone 11',
81+
os: 'ios',
82+
os_version: '13',
8383
real_mobile: true,
8484
browser_version: null,
8585
},
@@ -94,47 +94,47 @@ module.exports = {
9494
// real_mobile: null,
9595
// },
9696
bs_ie11: {
97-
base: "BrowserStack",
98-
browser: "IE",
99-
browser_version: "11.0",
100-
os: "Windows",
101-
os_version: "10",
97+
base: 'BrowserStack',
98+
browser: 'IE',
99+
browser_version: '11.0',
100+
os: 'Windows',
101+
os_version: '10',
102102
device: null,
103103
real_mobile: null,
104104
},
105105
bs_safari: {
106-
base: "BrowserStack",
107-
browser: "Safari",
108-
browser_version: "latest",
109-
os: "OS X",
110-
os_version: "Catalina",
106+
base: 'BrowserStack',
107+
browser: 'Safari',
108+
browser_version: 'latest',
109+
os: 'OS X',
110+
os_version: 'Catalina',
111111
device: null,
112112
real_mobile: null,
113113
},
114114
bs_edge: {
115-
base: "BrowserStack",
116-
browser: "Edge",
117-
browser_version: "latest",
118-
os: "Windows",
119-
os_version: "10",
115+
base: 'BrowserStack',
116+
browser: 'Edge',
117+
browser_version: 'latest',
118+
os: 'Windows',
119+
os_version: '10',
120120
device: null,
121121
real_mobile: null,
122122
},
123123
bs_firefox: {
124-
base: "BrowserStack",
125-
browser: "Firefox",
126-
browser_version: "latest",
127-
os: "Windows",
128-
os_version: "10",
124+
base: 'BrowserStack',
125+
browser: 'Firefox',
126+
browser_version: 'latest',
127+
os: 'Windows',
128+
os_version: '10',
129129
device: null,
130130
real_mobile: null,
131131
},
132132
bs_chrome: {
133-
base: "BrowserStack",
134-
browser: "Chrome",
135-
browser_version: "latest",
136-
os: "Windows",
137-
os_version: "10",
133+
base: 'BrowserStack',
134+
browser: 'Chrome',
135+
browser_version: 'latest',
136+
os: 'Windows',
137+
os_version: '10',
138138
device: null,
139139
real_mobile: null,
140140
},

packages/browser/test/integration/common/init.js

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,55 +14,44 @@ var breadcrumbHints = [];
1414
// Oh dear IE10...
1515
var dsn =
1616
document.location.protocol +
17-
"//public@" +
17+
'//public@' +
1818
document.location.hostname +
19-
(document.location.port ? ":" + document.location.port : "") +
20-
"/1";
19+
(document.location.port ? ':' + document.location.port : '') +
20+
'/1';
2121

2222
function initSDK() {
2323
Sentry.init({
2424
dsn: dsn,
2525
integrations: [new Sentry.Integrations.Dedupe()],
2626
attachStacktrace: true,
27-
ignoreErrors: ["ignoreErrorTest"],
28-
denyUrls: ["foo.js"],
29-
beforeSend: function(event, eventHint) {
27+
ignoreErrors: ['ignoreErrorTest'],
28+
denyUrls: ['foo.js'],
29+
beforeSend: function (event, eventHint) {
3030
events.push(event);
3131
eventHints.push(eventHint);
3232
return event;
3333
},
34-
beforeBreadcrumb: function(breadcrumb, breadcrumbHint) {
34+
beforeBreadcrumb: function (breadcrumb, breadcrumbHint) {
3535
// Filter console logs as we use them for debugging *a lot* and they are not *that* important
3636
// But allow then if we explicitly say so (for one of integration tests)
37-
if (
38-
breadcrumb.category === "console" &&
39-
!window.allowConsoleBreadcrumbs
40-
) {
37+
if (breadcrumb.category === 'console' && !window.allowConsoleBreadcrumbs) {
4138
return null;
4239
}
4340

4441
// One of the tests use manually created breadcrumb without eventId and we want to let it through
45-
if (
46-
breadcrumb.category.indexOf("sentry") === 0 &&
47-
breadcrumb.event_id &&
48-
!window.allowSentryBreadcrumbs
49-
) {
42+
if (breadcrumb.category.indexOf('sentry') === 0 && breadcrumb.event_id && !window.allowSentryBreadcrumbs) {
5043
return null;
5144
}
5245

5346
if (
54-
breadcrumb.type === "http" &&
55-
(breadcrumb.data.url.indexOf("test.js") !== -1 ||
56-
breadcrumb.data.url.indexOf("frame.html") !== -1)
47+
breadcrumb.type === 'http' &&
48+
(breadcrumb.data.url.indexOf('test.js') !== -1 || breadcrumb.data.url.indexOf('frame.html') !== -1)
5749
) {
5850
return null;
5951
}
6052

6153
// Filter "refresh" like navigation which occurs in Mocha when testing on Android 4
62-
if (
63-
breadcrumb.category === "navigation" &&
64-
breadcrumb.data.to === breadcrumb.data.from
65-
) {
54+
if (breadcrumb.category === 'navigation' && breadcrumb.data.to === breadcrumb.data.from) {
6655
return null;
6756
}
6857

packages/browser/test/integration/common/triggers.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ function foo2() {
1616

1717
function throwNonError() {
1818
try {
19-
throw { foo: "bar" };
19+
throw { foo: 'bar' };
2020
} catch (o_O) {
2121
Sentry.captureException(o_O);
2222
}
2323
}
2424

2525
function throwError(message) {
2626
// eslint-disable-next-line no-param-reassign
27-
message = message || "foo";
27+
message = message || 'foo';
2828
try {
2929
throw new Error(message);
3030
} catch (o_O) {
@@ -34,7 +34,7 @@ function throwError(message) {
3434

3535
function throwRandomError() {
3636
try {
37-
throw new Error("Exception no " + (Date.now() + Math.random()));
37+
throw new Error('Exception no ' + (Date.now() + Math.random()));
3838
} catch (o_O) {
3939
Sentry.captureException(o_O);
4040
}
@@ -47,12 +47,12 @@ function throwSameConsecutiveErrors(message) {
4747

4848
function captureMessage(message) {
4949
// eslint-disable-next-line no-param-reassign
50-
message = message || "message";
50+
message = message || 'message';
5151
Sentry.captureMessage(message);
5252
}
5353

5454
function captureRandomMessage() {
55-
Sentry.captureMessage("Message no " + (Date.now() + Math.random()));
55+
Sentry.captureMessage('Message no ' + (Date.now() + Math.random()));
5656
}
5757

5858
function captureSameConsecutiveMessages(message) {

0 commit comments

Comments
 (0)