Skip to content

FCE-3072: Fix lint: use typescript import resolver in mobile-client eslint config#512

Merged
MiloszFilimowski merged 5 commits intomainfrom
cursor/web-sdk-linting-issue-with-jest-plugin-8098
Mar 31, 2026
Merged

FCE-3072: Fix lint: use typescript import resolver in mobile-client eslint config#512
MiloszFilimowski merged 5 commits intomainfrom
cursor/web-sdk-linting-issue-with-jest-plugin-8098

Conversation

@MiloszFilimowski
Copy link
Copy Markdown
Collaborator

@MiloszFilimowski MiloszFilimowski commented Mar 30, 2026

Description

Fix the broken yarn lint:check by configuring the TypeScript import resolver in the mobile-client package's ESLint configuration.

The expo ESLint config (extended by mobile-client/.eslintrc) enables import/no-unresolved via plugin:import/errors. The default node resolver cannot resolve yarn workspace packages like @fishjam-cloud/react-client and @fishjam-cloud/ts-client, causing 4 lint errors:

packages/mobile-client/src/index.ts
  16:8   error  Unable to resolve path to module '@fishjam-cloud/react-client'  import/no-unresolved
  17:31  error  Unable to resolve path to module '@fishjam-cloud/ts-client'     import/no-unresolved
  51:8   error  Unable to resolve path to module '@fishjam-cloud/react-client'  import/no-unresolved

packages/mobile-client/src/overrides/hooks.ts
  10:8  error  Unable to resolve path to module '@fishjam-cloud/react-client'  import/no-unresolved

Instead of disabling import/no-unresolved entirely, the fix:

  1. Adds eslint-import-resolver-typescript as a direct devDependency of mobile-client so it's always available regardless of hoisting.
  2. Configures it in .eslintrc settings so the resolver can follow workspace package references through tsconfig.json and package.json exports.

This keeps import/no-unresolved active to catch real unresolved imports.

Motivation and Context

The yarn lint:check was failing in the mobile-client workspace due to the expo ESLint config bringing in the import/no-unresolved rule which the default node resolver cannot handle for workspace package imports.

Documentation impact

  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
Open in Web Open in Cursor 

MiloszFilimowski and others added 3 commits March 30, 2026 13:44
Co-authored-by: milosz.filimowski <milosz.filimowski@swmansion.com>
The expo ESLint config enables import/no-unresolved via plugin:import/errors,
but the import resolver cannot resolve yarn workspace packages like
@fishjam-cloud/react-client and @fishjam-cloud/ts-client.

This is the same approach used in the fishjam-chat example.

Co-authored-by: milosz.filimowski <milosz.filimowski@swmansion.com>
@MiloszFilimowski MiloszFilimowski changed the title Fix lint: disable import/no-unresolved in mobile-client eslint config FCE-3072: Fix lint: disable import/no-unresolved in mobile-client eslint config Mar 30, 2026
@linear
Copy link
Copy Markdown

linear bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the mobile-client ESLint configuration to address lint failures caused by import/no-unresolved not resolving Yarn workspace package imports under the expo ESLint preset.

Changes:

  • Disable import/no-unresolved in packages/mobile-client/.eslintrc to unblock yarn lint:check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/mobile-client/.eslintrc Outdated
The expo ESLint config enables import/no-unresolved via plugin:import/errors,
but the default node resolver cannot resolve yarn workspace packages like
@fishjam-cloud/react-client and @fishjam-cloud/ts-client.

Instead of disabling the rule, configure eslint-import-resolver-typescript
which can follow workspace package references through tsconfig and
package.json exports.

Co-authored-by: milosz.filimowski <milosz.filimowski@swmansion.com>
@cursor cursor bot changed the title FCE-3072: Fix lint: disable import/no-unresolved in mobile-client eslint config FCE-3072: Fix lint: use typescript import resolver in mobile-client eslint config Mar 30, 2026
@MiloszFilimowski MiloszFilimowski marked this pull request as ready for review March 30, 2026 12:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/mobile-client/.eslintrc
…le-client

Co-authored-by: milosz.filimowski <milosz.filimowski@swmansion.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/mobile-client/.eslintrc
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MiloszFilimowski MiloszFilimowski merged commit e118630 into main Mar 31, 2026
10 checks passed
@MiloszFilimowski MiloszFilimowski deleted the cursor/web-sdk-linting-issue-with-jest-plugin-8098 branch March 31, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants