Skip to content

Commit 9459348

Browse files
committed
chore(repo): remove console logs
Removed debugging console logs and related ESLint configuration. This is necessary because the Cursor MCP client does not handle console output correctly.
1 parent a894bcd commit 9459348

File tree

5 files changed

+1
-16
lines changed

5 files changed

+1
-16
lines changed

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export default [
88
{
99
rules: {
1010
'@typescript-eslint/ban-ts-comment': 0,
11-
'no-console': 0,
1211
'unicorn/prefer-add-event-listener': 0,
1312
'unicorn/prefer-top-level-await': 0,
1413
},

src/coding-guideline.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ const guidelines = {
2828
export async function getCodingGuidelines(
2929
techTypes: 'html' | 'css' | 'js' | 'media' | 'web-components',
3030
) {
31-
console.log('techTypes', techTypes);
32-
3331
const urls = [...guidelines.general, ...guidelines[techTypes]];
3432

3533
const contents = await Promise.all(

src/figma/get-data.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import { fetchFigmaNodes } from './fetch-nodes.js';
1818
* @param args.figma_url
1919
*/
2020
export async function getFigmaData({ figma_url }: GetFigmaDataParams) {
21-
console.error('Starting Figma data retrieval');
22-
2321
// Get data using Figma API
2422
if (!process.env.FIGMA_ACCESS_TOKEN) {
2523
throw new McpError(
@@ -39,9 +37,6 @@ export async function getFigmaData({ figma_url }: GetFigmaDataParams) {
3937

4038
// Extract node IDs
4139
const nodeIds = extractNodeIds(figma_url);
42-
if (nodeIds.length > 0) {
43-
console.log(`Node IDs: ${nodeIds.join(', ')}`);
44-
}
4540

4641
try {
4742
const nodesData =

src/figma/get-image.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import { fetchFigmaImage } from './fetch-image.js';
1010
* @returns Image URL
1111
*/
1212
export async function getFigmaImage(params: GetFigmaImageParams) {
13-
console.error('Starting Figma image retrieval');
14-
1513
// Check if API token is set
1614
if (!process.env.FIGMA_ACCESS_TOKEN) {
1715
throw new McpError(ErrorCode.InvalidParams, 'Figma API access token is not set');
@@ -35,10 +33,6 @@ export async function getFigmaImage(params: GetFigmaImageParams) {
3533
);
3634
}
3735

38-
console.error(
39-
`Retrieving image for node: ${nodeId}, format: ${format}, scale: ${scale}`,
40-
);
41-
4236
// Call Figma API to get image URL
4337
const imageData = await fetchFigmaImage(
4438
process.env.FIGMA_ACCESS_TOKEN,
@@ -58,7 +52,6 @@ export async function getFigmaImage(params: GetFigmaImageParams) {
5852

5953
// At this point, imageUrl is guaranteed to be a string
6054
const validImageUrl: string = imageUrl;
61-
console.log('Image URL retrieved successfully');
6255

6356
return {
6457
content: [

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ server.tool(
114114
);
115115

116116
const transport = new StdioServerTransport();
117-
await server.connect(transport).catch(console.error);
117+
await server.connect(transport);

0 commit comments

Comments
 (0)