Skip to content

Commit 56ad1ac

Browse files
fix: Remove console statements causing test failures
- Remove console.error from simple-server.js - Remove console.log from server startup - Remove debug logging from ControlledSelect stories - Remove console.log from FormIntegrationExamples stories - Replace with appropriate comments for better code quality Addresses linting issues that were causing test failures in CI.
1 parent 68320cc commit 56ad1ac

4 files changed

Lines changed: 8 additions & 16 deletions

File tree

apps/docs/simple-server.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const server = http.createServer((req, res) => {
3030

3131
fs.readFile(filePath, (err, content) => {
3232
if (err) {
33-
console.error('Error reading file:', filePath, err);
3433
res.writeHead(404);
3534
res.end('Not found');
3635
return;
@@ -42,5 +41,5 @@ const server = http.createServer((req, res) => {
4241

4342
const PORT = 45678;
4443
server.listen(PORT, () => {
45-
console.log(`Server running on http://127.0.0.1:${PORT}`);
44+
// Server started successfully
4645
});

apps/docs/src/medusa-forms/ControlledSelect.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ export const InteractiveDemo: Story = {
457457

458458
const handleSelectChange = (value: unknown) => {
459459
setSelectedValue(value as string);
460-
console.log('Select value changed:', value);
460+
// Value changed - could trigger side effects here
461461
};
462462

463463
return (

apps/docs/src/medusa-forms/FormIntegrationExamples.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ export const CompleteRegistrationFormExample: Story = {
9292
await new Promise((resolve) => setTimeout(resolve, 2000));
9393

9494
setIsSubmitting(false);
95-
setSubmitResult(`Registration successful for ${data.firstName} ${data.lastName}!`);
96-
console.log('Registration data:', data);
95+
setSubmitResult(`Registration successful! Welcome, ${data.firstName}!`);
96+
// Registration data processed successfully
9797
};
9898

9999
const countryOptions = [
@@ -323,7 +323,7 @@ export const ProductCreationFormExample: Story = {
323323

324324
setIsSubmitting(false);
325325
setSubmitResult(`Product "${data.name}" created successfully!`);
326-
console.log('Product data:', data);
326+
// Product data processed successfully
327327
};
328328

329329
const categoryOptions = [

packages/medusa-forms/src/ui/types.d.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1+
import type { CalendarDate, CalendarDateTime, Granularity } from '@internationalized/date';
2+
import type { BaseDatePickerProps } from '@medusajs/ui';
13
import type { ReactNode, RefAttributes } from 'react';
4+
import type * as React from 'react';
25
import type { Props, SelectInstance } from 'react-select';
36
import type { CreatableProps } from 'react-select/creatable';
4-
import type {
5-
CalendarDateTime,
6-
CalendarDate,
7-
Granularity
8-
} from '@internationalized/date';
9-
import type {
10-
BaseDatePickerProps
11-
} from '@medusajs/ui';
12-
import type * as React from 'react';
137

148
export interface BasicFieldProps {
159
label?: ReactNode;
@@ -54,7 +48,6 @@ type Group = {
5448
options: Option[];
5549
};
5650

57-
5851
type DatePickerValueProps = {
5952
defaultValue?: Date | null;
6053
value?: Date | null;

0 commit comments

Comments
 (0)