Skip to content

Commit bcc7dcc

Browse files
authored
Merge e991044 into 267ed95
2 parents 267ed95 + e991044 commit bcc7dcc

File tree

481 files changed

+3345
-3328
lines changed

Some content is hidden

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

481 files changed

+3345
-3328
lines changed

eslint.config.mjs

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import tseslint from 'typescript-eslint';
1212

1313
const ignorePatterns = {
1414
ignores: [
15+
'generated',
1516
'packages/base/dist',
1617
'packages/base/types',
1718
'packages/charts/dist',
@@ -27,8 +28,8 @@ const ignorePatterns = {
2728
'**/examples',
2829
'**/templates',
2930
'**/*.module.css.ts',
30-
'.yarn'
31-
]
31+
'.yarn',
32+
],
3233
};
3334

3435
const config = tseslint.config(
@@ -46,14 +47,14 @@ const config = tseslint.config(
4647
// eslint-plugin-react-hooks
4748
{
4849
plugins: {
49-
'react-hooks': reactHooksPlugin
50+
'react-hooks': reactHooksPlugin,
5051
},
51-
rules: reactHooksPlugin.configs.recommended.rules
52+
rules: reactHooksPlugin.configs.recommended.rules,
5253
},
5354
{
5455
languageOptions: {
5556
globals: {
56-
...globals.browser
57+
...globals.browser,
5758
},
5859

5960
ecmaVersion: 'latest',
@@ -63,15 +64,15 @@ const config = tseslint.config(
6364
projectService: {
6465
allowDefaultProject: ['packages/*/postcss.config.mjs'],
6566
// eslint-disable-next-line camelcase
66-
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 1000
67-
}
68-
}
67+
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 1000,
68+
},
69+
},
6970
},
7071

7172
settings: {
7273
react: {
73-
version: 'detect'
74-
}
74+
version: 'detect',
75+
},
7576
},
7677

7778
rules: {
@@ -89,9 +90,9 @@ const config = tseslint.config(
8990
'sap_horizon',
9091
'sap_horizon_dark',
9192
'sap_horizon_hcb',
92-
'sap_horizon_hcw'
93-
]
94-
}
93+
'sap_horizon_hcw',
94+
],
95+
},
9596
],
9697

9798
'import/order': [
@@ -101,25 +102,25 @@ const config = tseslint.config(
101102

102103
alphabetize: {
103104
order: 'asc',
104-
caseInsensitive: true
105-
}
106-
}
105+
caseInsensitive: true,
106+
},
107+
},
107108
],
108109

109110
'import/no-duplicates': 'error',
110111
'import/no-unresolved': 'off',
111112

112113
// recommended eslint rules
113-
'no-extra-boolean-cast': 'warn'
114-
}
114+
'no-extra-boolean-cast': 'warn',
115+
},
115116
},
116117
{
117118
files: ['**/*.ts', '**/*.tsx'],
118119

119120
settings: {
120121
'import/resolver': {
121-
typescript: true
122-
}
122+
typescript: true,
123+
},
123124
},
124125

125126
rules: {
@@ -136,16 +137,16 @@ const config = tseslint.config(
136137
'@typescript-eslint/consistent-type-exports': [
137138
'error',
138139
{
139-
fixMixedExportsWithInlineTypeSpecifier: false
140-
}
140+
fixMixedExportsWithInlineTypeSpecifier: false,
141+
},
141142
],
142143

143144
'@typescript-eslint/consistent-type-imports': [
144145
'error',
145146
{
146147
prefer: 'type-imports',
147-
fixStyle: 'separate-type-imports'
148-
}
148+
fixStyle: 'separate-type-imports',
149+
},
149150
],
150151

151152
'@typescript-eslint/no-floating-promises': 'warn',
@@ -155,55 +156,55 @@ const config = tseslint.config(
155156
{
156157
varsIgnorePattern: '^_',
157158
argsIgnorePattern: '^_',
158-
caughtErrorsIgnorePattern: '^_'
159-
}
159+
caughtErrorsIgnorePattern: '^_',
160+
},
160161
],
161162

162163
'import/named': 'off',
163164
'import/namespace': 'off',
164165
'import/default': 'off',
165-
'import/no-named-as-default-member': 'off'
166-
}
166+
'import/no-named-as-default-member': 'off',
167+
},
167168
},
168169
{
169170
files: ['**/*.mjs'],
170-
...tseslint.configs.disableTypeChecked
171+
...tseslint.configs.disableTypeChecked,
171172
},
172173
{
173174
files: [
174175
'packages/main/src/webComponents/*/index.tsx',
175176
'packages/compat/src/components/TableCell/index.tsx',
176-
'packages/compat/src/components/TableGroupRow/index.tsx'
177+
'packages/compat/src/components/TableGroupRow/index.tsx',
177178
],
178179

179180
rules: {
180-
'@typescript-eslint/no-empty-object-type': 'off'
181-
}
181+
'@typescript-eslint/no-empty-object-type': 'off',
182+
},
182183
},
183184
{
184185
files: [
185186
'packages/main/src/components/AnalyticalTable/defaults/**/*.tsx',
186187
'packages/main/src/components/AnalyticalTable/hooks/*.ts',
187188
'packages/main/src/components/AnalyticalTable/hooks/*.tsx',
188-
'packages/main/src/components/AnalyticalTable/TableBody/VirtualTableBodyContainer.tsx'
189+
'packages/main/src/components/AnalyticalTable/TableBody/VirtualTableBodyContainer.tsx',
189190
],
190191

191192
rules: {
192-
'react/prop-types': 'off'
193-
}
193+
'react/prop-types': 'off',
194+
},
194195
},
195196
{
196197
files: ['cypress/**/*'],
197198

198199
rules: {
199-
'@typescript-eslint/no-namespace': 'off'
200-
}
200+
'@typescript-eslint/no-namespace': 'off',
201+
},
201202
},
202203
{
203204
files: ['**/*.cy.ts', '**/*.cy.tsx'],
204205

205206
plugins: {
206-
'no-only-tests': noOnlyTests
207+
'no-only-tests': noOnlyTests,
207208
},
208209

209210
rules: {
@@ -212,8 +213,8 @@ const config = tseslint.config(
212213
'react/no-unescaped-entities': 'off',
213214
'@typescript-eslint/unbound-method': 'warn',
214215
'react/display-name': 'off',
215-
'no-only-tests/no-only-tests': 'error'
216-
}
216+
'no-only-tests/no-only-tests': 'error',
217+
},
217218
},
218219

219220
// Storybook
@@ -223,8 +224,8 @@ const config = tseslint.config(
223224
rules: {
224225
'react/prop-types': 'off',
225226
'@typescript-eslint/no-unused-vars': 'warn',
226-
'react/no-unescaped-entities': 'off'
227-
}
227+
'react/no-unescaped-entities': 'off',
228+
},
228229
},
229230

230231
// no-restricted-imports rule for compat package
@@ -238,16 +239,16 @@ const config = tseslint.config(
238239
{
239240
name: '@ui5/webcomponents-react',
240241
message:
241-
"Please use deep imports from @ui5/webcomponents-react. Example: import { Button } from '@ui5/webcomponents-react/dist/webComponents/Button/index.js';"
242-
}
243-
]
244-
}
245-
]
246-
}
242+
"Please use deep imports from @ui5/webcomponents-react. Example: import { Button } from '@ui5/webcomponents-react/dist/webComponents/Button/index.js';",
243+
},
244+
],
245+
},
246+
],
247+
},
247248
},
248249

249250
// prettier plugin must be the last entry in the config!
250-
prettierPlugin
251+
prettierPlugin,
251252
);
252253

253254
export default config;

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,mjs,cjs}\"",
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

0 commit comments

Comments
 (0)