Skip to content

pnpm lint error #268

@yinvoke

Description

@yinvoke

Describe the bug
Running pnpm lint results in 58 ESLint errors and warnings across multiple TypeScript files. The main issues include:
Missing global type definitions (NodeJS, RequestInit, Jest globals)
Unused variables and imports
Missing return type annotations
Unnecessary escape characters

Software Versions

  • Figma Developer MCP: v0.6.4
  • Node.js: v24.11.1
  • NPM: 10.10.0
  • Operating System: macOS 26.2 (Build 25C56)
  • Client: Cursor
  • Client Version: 2.5.0-pre.36.patch.0

To Reproduce

  1. Clone the repository
  2. Run pnpm install and Run pnpm lint
  3. see "error [ERR_MODULE_NOT_FOUND]: Cannot find package 'globals' imported from /Users/lilithgames/Figma-Context-MCP/eslint.config.js"
  4. install package 'globals'
  5. Run pnpm lint
  6. See 58 ESLint errors (29 errors, 29 warnings)
    Expected behavior
    A clear and concise description of what you expected to happen.

Screenshots

Image Image

Server Configuration
Provide your MCP JSON configuration, if applicable. E.g.

    "figma-developer-mcp": {
      "command": "npx",
      "args": [
        "figma-developer-mcp",
        "--figma-api-key=REDACTED",
        "--stdio"
      ]
    }

Full lint error list
/Users/Figma-Context-MCP/jest.config.js
19:13 error Unnecessary escape character: . no-useless-escape

/Users/Figma-Context-MCP/src/extractors/design-extractor.ts
48:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type

/Users/Figma-Context-MCP/src/mcp/index.ts
22:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type

/Users/Figma-Context-MCP/src/mcp/tools/download-figma-images-tool.ts
74:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type

/Users/Figma-Context-MCP/src/mcp/tools/get-figma-data-tool.ts
41:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type

/Users/Figma-Context-MCP/src/server.ts
66:9 warning Missing return type on function @typescript-eslint/explicit-function-return-type
67:9 warning Missing return type on function @typescript-eslint/explicit-function-return-type
72:30 warning Missing return type on function @typescript-eslint/explicit-function-return-type
93:27 error 'NodeJS' is not defined no-undef
124:68 warning Missing return type on function @typescript-eslint/explicit-function-return-type
198:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type

/Users/Figma-Context-MCP/src/services/figma.ts
8:10 error 'downloadFigmaImage' is defined but never used @typescript-eslint/no-unused-vars
151:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

/Users/Figma-Context-MCP/src/tests/benchmark.test.ts
3:1 error 'describe' is not defined no-undef
10:3 error 'it' is not defined no-undef
14:5 error 'expect' is not defined no-undef

/Users/Figma-Context-MCP/src/tests/integration.test.ts
11:1 error 'describe' is not defined no-undef
17:3 error 'beforeAll' is not defined no-undef
51:3 error 'afterAll' is not defined no-undef
55:3 error 'describe' is not defined no-undef
56:5 error 'it' is not defined no-undef
57:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
75:7 error 'expect' is not defined no-undef

/Users/Figma-Context-MCP/src/transformers/effects.ts
60:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type
64:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type
68:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type

/Users/Figma-Context-MCP/src/transformers/layout.ts
46:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type
95:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type
112:1 warning Missing return type on function @typescript-eslint/explicit-function-return-type
133:5 error Expected a 'break' statement before 'case' no-fallthrough

/Users/Figma-Context-MCP/src/transformers/style.ts
497:3 error 'elementBounds' is defined but never used. Allowed unused args must match /^/u @typescript-eslint/no-unused-vars
525:11 error 'fullLineLength' is assigned a value but never used @typescript-eslint/no-unused-vars
623:10 error 'findLineIntersections' is defined but never used @typescript-eslint/no-unused-vars
671:3 error 'edge' is defined but never used. Allowed unused args must match /^
/u @typescript-eslint/no-unused-vars
672:3 error 'widthHandle' is defined but never used. Allowed unused args must match /^/u @typescript-eslint/no-unused-vars
673:3 error 'elementBounds' is defined but never used. Allowed unused args must match /^
/u @typescript-eslint/no-unused-vars
698:3 error 'widthHandle' is defined but never used. Allowed unused args must match /^/u @typescript-eslint/no-unused-vars
699:3 error 'elementBounds' is defined but never used. Allowed unused args must match /^
/u @typescript-eslint/no-unused-vars
726:3 error 'edge' is defined but never used. Allowed unused args must match /^/u @typescript-eslint/no-unused-vars
727:3 error 'widthHandle' is defined but never used. Allowed unused args must match /^
/u @typescript-eslint/no-unused-vars
728:3 error 'elementBounds' is defined but never used. Allowed unused args must match /^_/u @typescript-eslint/no-unused-vars

/Users/Figma-Context-MCP/src/transformers/text.ts
23:74 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
28:8 warning Missing return type on function @typescript-eslint/explicit-function-return-type
34:8 warning Missing return type on function @typescript-eslint/explicit-function-return-type

/Users/Figma-Context-MCP/src/utils/common.ts
48:38 warning Missing return type on function @typescript-eslint/explicit-function-return-type
159:8 warning Missing return type on function @typescript-eslint/explicit-function-return-type

/Users/Figma-Context-MCP/src/utils/fetch-with-retry.ts
7:23 error 'RequestInit' is not defined no-undef
27:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
73:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

/Users/Figma-Context-MCP/src/utils/image-processing.ts
2:8 error 'path' is defined but never used @typescript-eslint/no-unused-vars
21:11 error 'skewX' is assigned a value but never used @typescript-eslint/no-unused-vars
23:11 error 'skewY' is assigned a value but never used @typescript-eslint/no-unused-vars

/Users/Figma-Context-MCP/src/utils/logger.ts
5:3 warning Missing return type on function @typescript-eslint/explicit-function-return-type
5:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
12:3 warning Missing return type on function @typescript-eslint/explicit-function-return-type
12:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
17:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

/Users/Figma-Context-MCP/tsup.config.ts
13:20 error 'format' is defined but never used. Allowed unused args must match /^_/u @typescript-eslint/no-unused-vars

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions