Skip to content

Commit 14aa12a

Browse files
committed
chore: lint ts, tsx, js, jsx files
1 parent 389dbbe commit 14aa12a

File tree

8 files changed

+131
-115
lines changed

8 files changed

+131
-115
lines changed

scripts/api-ja.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const DEMOS_PATH = path.resolve('static/demos');
88
let COMPONENT_LINK_REGEXP;
99

1010
(async function () {
11-
const response = await fetch('https://raw.githubusercontent.com/ionic-team/ionic-docs/translation/jp/scripts/data/translated-api.json');
11+
const response = await fetch(
12+
'https://raw.githubusercontent.com/ionic-team/ionic-docs/translation/jp/scripts/data/translated-api.json'
13+
);
1214
const { components } = await response.json();
1315

1416
const names = components.map((component) => component.tag.slice(4));

scripts/release-notes.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@ const OUTPUT_PATH = resolve(__dirname, '../src/components/page/reference/Release
2323
// https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on
2424
const getReleases = async () => {
2525
try {
26-
const request = await fetch(
27-
new URL('repos/ionic-team/ionic/releases', 'https://api.github.com'),
28-
{
29-
headers: {
30-
Authorization: process.env.GITHUB_TOKEN !== undefined ? `token ${process.env.GITHUB_TOKEN}` : '',
31-
},
32-
}
33-
);
26+
const request = await fetch(new URL('repos/ionic-team/ionic/releases', 'https://api.github.com'), {
27+
headers: {
28+
Authorization: process.env.GITHUB_TOKEN !== undefined ? `token ${process.env.GITHUB_TOKEN}` : '',
29+
},
30+
});
3431

3532
const releases = await request.json();
3633

@@ -64,7 +61,7 @@ const getReleases = async () => {
6461
return -semver.compare(a.tag_name, b.tag_name);
6562
});
6663
} else {
67-
console.error("There was an issue getting releases:", releases);
64+
console.error('There was an issue getting releases:', releases);
6865
return [];
6966
}
7067
} catch (error) {

sidebars.js

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ module.exports = {
1010
type: 'category',
1111
label: 'Upgrade Guides',
1212
collapsed: false,
13-
items: [
14-
'updating/7-0',
15-
'updating/6-0',
16-
'updating/5-0',
17-
'updating/4-0'
18-
]
13+
items: ['updating/7-0', 'updating/6-0', 'updating/5-0', 'updating/4-0'],
1914
},
2015
{
2116
type: 'category',
@@ -30,7 +25,7 @@ module.exports = {
3025
'developing/tips',
3126
'developing/hardware-back-button',
3227
'developing/keyboard',
33-
'developing/config'
28+
'developing/config',
3429
],
3530
},
3631
{
@@ -45,7 +40,7 @@ module.exports = {
4540
href: '/docs/api/grid',
4641
},
4742
'layout/global-stylesheets',
48-
'layout/css-utilities'
43+
'layout/css-utilities',
4944
],
5045
},
5146
{
@@ -229,7 +224,7 @@ module.exports = {
229224
href: 'https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md',
230225
},
231226
'reference/support',
232-
'reference/browser-support'
227+
'reference/browser-support',
233228
],
234229
},
235230
],
@@ -362,12 +357,7 @@ module.exports = {
362357
type: 'category',
363358
label: 'Media',
364359
collapsed: false,
365-
items: [
366-
'api/avatar',
367-
'api/icon',
368-
'api/img',
369-
'api/thumbnail',
370-
],
360+
items: ['api/avatar', 'api/icon', 'api/img', 'api/thumbnail'],
371361
},
372362
{
373363
type: 'category',
@@ -520,11 +510,7 @@ module.exports = {
520510
type: 'category',
521511
label: 'Getting Started',
522512
collapsed: false,
523-
items: [
524-
'native',
525-
'native-setup',
526-
'native-faq',
527-
],
513+
items: ['native', 'native-setup', 'native-faq'],
528514
},
529515
{
530516
type: 'category',

src/components/global/Playground/index.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default function Playground({
155155

156156
// Otherwise, default to the first target passed.
157157
return Object.keys(code)[0];
158-
}
158+
};
159159

160160
/**
161161
* Developers can set a predefined size
@@ -436,22 +436,21 @@ export default function Playground({
436436
<div className="playground__control-toolbar">
437437
<div className="playground__control-group">
438438
{sortedUsageTargets.map((lang) => {
439-
440439
/**
441440
* If code was not passed for this target
442441
* then we should disable the button.
443442
*/
444443
const langValue = UsageTarget[lang];
445444
const hasCode = code[langValue] !== undefined;
446445
return (
447-
<CodeBlockButton
446+
<CodeBlockButton
448447
key={`code-block-${lang}`}
449448
language={lang}
450449
usageTarget={usageTarget}
451450
setUsageTarget={setUsageTarget}
452451
disabled={!hasCode}
453-
/>)
454-
;
452+
/>
453+
);
455454
})}
456455
</div>
457456
<div className="playground__control-group">
@@ -577,12 +576,20 @@ export default function Playground({
577576
*/}
578577
{devicePreview
579578
? [
580-
<div key="ios-iframe" className={!isIOS ? 'frame-hidden' : 'frame-visible'} aria-hidden={!isIOS ? 'true' : null}>
579+
<div
580+
key="ios-iframe"
581+
className={!isIOS ? 'frame-hidden' : 'frame-visible'}
582+
aria-hidden={!isIOS ? 'true' : null}
583+
>
581584
<device-preview mode="ios">
582585
<iframe height={frameSize} ref={(ref) => handleFrameRef(ref, 'ios')} src={sourceiOS}></iframe>
583586
</device-preview>
584587
</div>,
585-
<div key="md-iframe" className={!isMD ? 'frame-hidden' : 'frame-visible'} aria-hidden={!isMD ? 'true' : null}>
588+
<div
589+
key="md-iframe"
590+
className={!isMD ? 'frame-hidden' : 'frame-visible'}
591+
aria-hidden={!isMD ? 'true' : null}
592+
>
586593
<device-preview mode="md">
587594
<iframe height={frameSize} ref={(ref) => handleFrameRef(ref, 'md')} src={sourceMD}></iframe>
588595
</device-preview>

0 commit comments

Comments
 (0)