Skip to content

Commit 8174d93

Browse files
committed
chore(prettier): enable trailing commas
1 parent 7b68d03 commit 8174d93

File tree

479 files changed

+3292
-3276
lines changed

Some content is hidden

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

479 files changed

+3292
-3276
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"test": "yarn test:prepare && cypress run --component --browser chrome",
1919
"clean": "tsc --build --clean && tsc --build tsconfig.build.json --clean && rimraf temp .out && lerna run clean",
2020
"clean:remove-modules": "yarn clean && rimraf node_modules",
21-
"prettier:all": "prettier --write --config ./prettier.config.cjs \"packages/**/*.{js,jsx,ts,tsx,mdx,json,md}\"",
21+
"prettier:all": "prettier --write --config ./prettier.config.js \"packages/**/*.{js,jsx,ts,tsx,mdx,json,md}\"",
2222
"lint": "eslint packages",
2323
"lerna:version-dryrun": "lerna version --conventional-graduate --no-git-tag-version --no-push",
2424
"wrappers:main": "node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents --out ./packages/main/src/webComponents --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)'",

packages/ai/src/components/Button/Button.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const meta = {
1414
title: 'Button',
1515
component: Button,
1616
argTypes: {
17-
children: { control: 'text' }
17+
children: { control: 'text' },
1818
},
1919
args: {
20-
design: ButtonDesign.Default
20+
design: ButtonDesign.Default,
2121
},
22-
tags: ['package:@ui5/webcomponents-ai']
22+
tags: ['package:@ui5/webcomponents-ai'],
2323
} satisfies Meta<typeof Button>;
2424

2525
export default meta;
@@ -106,5 +106,5 @@ export const Default: Story = {
106106
)}
107107
</>
108108
);
109-
}
109+
},
110110
};

packages/ai/src/components/Button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const Button = withWebComponent<ButtonPropTypes, ButtonDomRef>(
100100
['design', 'state'],
101101
['arrowButtonPressed', 'disabled'],
102102
[],
103-
['arrow-button-click', 'click']
103+
['arrow-button-click', 'click'],
104104
);
105105

106106
Button.displayName = 'Button';

packages/ai/src/components/ButtonState/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const ButtonState = withWebComponent<ButtonStatePropTypes, ButtonStateDomRef>(
7373
['endIcon', 'icon', 'name', 'text'],
7474
['showArrowButton'],
7575
[],
76-
[]
76+
[],
7777
);
7878

7979
ButtonState.displayName = 'ButtonState';

packages/ai/src/components/PromptInput/PromptInput.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ const meta = {
77
component: PromptInput,
88
argTypes: {
99
children: { control: { disable: true } },
10-
valueStateMessage: { control: { disable: true } }
10+
valueStateMessage: { control: { disable: true } },
1111
},
1212
args: {
13-
valueState: ValueState.None
13+
valueState: ValueState.None,
1414
},
15-
tags: ['package:@ui5/webcomponents-ai']
15+
tags: ['package:@ui5/webcomponents-ai'],
1616
} satisfies Meta<typeof PromptInput>;
1717

1818
export default meta;

packages/ai/src/components/PromptInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ const PromptInput = withWebComponent<PromptInputPropTypes, PromptInputDomRef>(
185185
['label', 'maxlength', 'placeholder', 'value', 'valueState'],
186186
['disabled', 'readonly', 'showClearIcon', 'showExceededText', 'showSuggestions'],
187187
['valueStateMessage'],
188-
['change', 'input', 'submit']
188+
['change', 'input', 'submit'],
189189
);
190190

191191
PromptInput.displayName = 'PromptInput';

packages/base/src/Device/Media.cy.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe('Device - Media', () => {
77
expect(getCurrentRange()).to.deep.equal({
88
from: 1440,
99
name: 'LargeDesktop',
10-
unit: 'px'
10+
unit: 'px',
1111
});
1212
});
1313

@@ -16,7 +16,7 @@ describe('Device - Media', () => {
1616
from: 0,
1717
name: 'Phone',
1818
to: 599,
19-
unit: 'px'
19+
unit: 'px',
2020
});
2121
});
2222

packages/base/src/Device/Media.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ const RANGE_DEFINITIONS: Record<RANGE_4_STEPS, [number, number]> = {
1010
S: [0, 599],
1111
M: [600, 1023],
1212
L: [1024, 1439],
13-
XL: [1440, -1]
13+
XL: [1440, -1],
1414
};
1515

1616
const newRangeToLegacyRangeMap: Record<RANGE_4_STEPS, RANGE_LEGACY_4_STEPS> = {
1717
S: 'Phone',
1818
M: 'Tablet',
1919
L: 'Desktop',
20-
XL: 'LargeDesktop'
20+
XL: 'LargeDesktop',
2121
};
2222

2323
function getQuery(from: number, to: number) {
@@ -35,7 +35,7 @@ function resolveRangeInfo(name: RANGE_4_STEPS): RangeInfo {
3535
const params: RangeInfo = {
3636
from: RANGE_DEFINITIONS[name][0],
3737
name: newRangeToLegacyRangeMap[name],
38-
unit: 'px'
38+
unit: 'px',
3939
};
4040
if (RANGE_DEFINITIONS[name][1] > 0) {
4141
params.to = RANGE_DEFINITIONS[name][1];
@@ -51,7 +51,7 @@ function initMediaQueries() {
5151
S: window.matchMedia(getQuery(...RANGE_DEFINITIONS.S)),
5252
M: window.matchMedia(getQuery(...RANGE_DEFINITIONS.M)),
5353
L: window.matchMedia(getQuery(...RANGE_DEFINITIONS.L)),
54-
XL: window.matchMedia(getQuery(...RANGE_DEFINITIONS.XL))
54+
XL: window.matchMedia(getQuery(...RANGE_DEFINITIONS.XL)),
5555
};
5656

5757
for (const mediaQueriesKey in mediaQueries) {
@@ -74,7 +74,7 @@ export const getCurrentRange = (width?: number): RangeInfo => {
7474
from: 1024,
7575
to: 1439,
7676
name: 'Desktop',
77-
unit: 'px'
77+
unit: 'px',
7878
};
7979
}
8080
// @ts-expect-error: width can only be undefined or a number, therefore `isNaN` works here

packages/base/src/Device/index.cy.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
attachOrientationChangeHandler,
44
attachResizeHandler,
55
detachOrientationChangeHandler,
6-
detachResizeHandler
6+
detachResizeHandler,
77
} from './index';
88

99
function ResizeTestComponent({ onChange }: { onChange: (event: { width: number; height: number }) => void }) {
@@ -23,7 +23,7 @@ function ResizeTestComponent({ onChange }: { onChange: (event: { width: number;
2323
}
2424

2525
function OrientationChangeComponent({
26-
onChange
26+
onChange,
2727
}: {
2828
onChange: (event: { portrait: boolean; landscape: boolean }) => void;
2929
}) {
@@ -50,7 +50,7 @@ describe('Device', () => {
5050
cy.viewport(200, 1080);
5151
cy.get('@resize').should('have.been.calledOnce').and('have.been.calledWith', {
5252
height: 1080,
53-
width: 200
53+
width: 200,
5454
});
5555

5656
cy.findByText('Unregister').click();
@@ -67,12 +67,12 @@ describe('Device', () => {
6767
cy.viewport('iphone-x', 'landscape');
6868
cy.get('@orientation').should('have.been.calledOnce').and('have.been.calledWith', {
6969
landscape: true,
70-
portrait: false
70+
portrait: false,
7171
});
7272
cy.viewport('iphone-x', 'portrait');
7373
cy.get('@orientation').should('have.been.calledTwice').and('have.been.calledWith', {
7474
landscape: true,
75-
portrait: false
75+
portrait: false,
7676
});
7777

7878
cy.findByText('Unregister').click();

packages/base/src/Device/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ const rInputTagRegex = /INPUT|TEXTAREA|SELECT/;
2121

2222
const internalWindowSize: IWindowSize = {
2323
height: 0,
24-
width: 0
24+
width: 0,
2525
};
2626

2727
const internalOrientation: IOrientation = {
2828
landscape: false,
29-
portrait: false
29+
portrait: false,
3030
};
3131

3232
// PRIVATE API
@@ -72,7 +72,7 @@ const handleOrientationChange = () => {
7272
setOrientationInfo();
7373
OrientationEventProvider.fireEvent('orientation', {
7474
landscape: internalOrientation.landscape,
75-
portrait: internalOrientation.portrait
75+
portrait: internalOrientation.portrait,
7676
});
7777
};
7878

@@ -139,7 +139,7 @@ const handleResizeChange = () => {
139139
setResizeInfo();
140140
ResizeEventProvider.fireEvent('resize', {
141141
height: internalWindowSize.height,
142-
width: internalWindowSize.width
142+
width: internalWindowSize.width,
143143
});
144144
};
145145

0 commit comments

Comments
 (0)