Skip to content

Commit 817fcb0

Browse files
author
amandaesmith333
committed
lint
1 parent 9fe4c7d commit 817fcb0

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

src/components/global/Playground/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,14 +473,14 @@ export default function Playground({
473473
<div className="playground__console" ref={consoleRef}>
474474
{(ionicMode === Mode.iOS ? iosConsoleItems : mdConsoleItems).map((consoleItem, i) => (
475475
<div key={i} className={`playground__console-item playground__console-item--${consoleItem.type}`}>
476-
{consoleItem.type !== 'log' && <div className="playground__console-icon">
477-
{consoleItem.type === 'warning' ? '⚠' : '❌'}
478-
</div>}
476+
{consoleItem.type !== 'log' && (
477+
<div className="playground__console-icon">{consoleItem.type === 'warning' ? '⚠' : '❌'}</div>
478+
)}
479479
<code>{consoleItem.message}</code>
480480
</div>
481481
))}
482482
</div>
483-
)
483+
);
484484
}
485485

486486
const sortedUsageTargets = useMemo(() => Object.keys(UsageTarget).sort(), []);

src/components/global/Playground/playground.types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ export enum Mode {
1111
}
1212

1313
export interface ConsoleItem {
14-
type: 'log' | 'warning' | 'error',
15-
message: string
16-
}
14+
type: 'log' | 'warning' | 'error';
15+
message: string;
16+
}

static/usage/common.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,27 @@ window.addEventListener('DOMContentLoaded', () => {
3232
_error = console.error;
3333

3434
const dispatchConsoleEvent = (type, arguments) => {
35-
window.dispatchEvent(new CustomEvent('console', {
36-
detail: {
37-
type,
38-
message: Object.values(arguments).join(' ')
39-
}
40-
}));
41-
}
35+
window.dispatchEvent(
36+
new CustomEvent('console', {
37+
detail: {
38+
type,
39+
message: Object.values(arguments).join(' '),
40+
},
41+
})
42+
);
43+
};
4244

43-
console.log = function() {
45+
console.log = function () {
4446
dispatchConsoleEvent('log', arguments);
4547
return _log.apply(console, arguments);
4648
};
4749

48-
console.warn = function() {
50+
console.warn = function () {
4951
dispatchConsoleEvent('warning', arguments);
5052
return _warn.apply(console, arguments);
5153
};
5254

53-
console.error = function() {
55+
console.error = function () {
5456
dispatchConsoleEvent('error', arguments);
5557
return _error.apply(console, arguments);
5658
};

0 commit comments

Comments
 (0)