Skip to content

chore: fix broken tsconfig.eslint.json include paths across monorepo#1249

Merged
joker23 merged 2 commits intomainfrom
devin/1775571809-fix-tsconfig-eslint-include-paths
Apr 7, 2026
Merged

chore: fix broken tsconfig.eslint.json include paths across monorepo#1249
joker23 merged 2 commits intomainfrom
devin/1775571809-fix-tsconfig-eslint-include-paths

Conversation

@joker23
Copy link
Copy Markdown
Contributor

@joker23 joker23 commented Apr 7, 2026

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

No test changes needed — this is a config-only fix. Lint was spot-checked on @launchdarkly/js-sdk-common, @launchdarkly/js-client-sdk-common, and @launchdarkly/js-client-sdk after the change.

Related issues

SDK-2137

Describe the solution you've provided

24 tsconfig.eslint.json files across the monorepo used "include": ["/**/*.ts"] with a leading /. This made the glob pattern a rooted path, causing TypeScript's matchFiles to build an include regex anchored at the filesystem root (/) instead of relative to the project directory. On Linux (and CI), this accidentally works because the over-broad regex still matches project files during directory traversal. On macOS, this causes ESLint to fail with Parsing error: ESLint was configured to run on <file> using parserOptions.project — however, that TSConfig does not include this file.

The fix removes the leading / from all affected include patterns, making them relative globs (e.g., /**/*.ts**/*.ts, /**/*.tsx**/*.tsx).

Describe alternatives you've considered

None — this is a straightforward one-character-per-pattern correction. The 11 already-correct files in the repo (e.g., server-node, server-ai, react, contract-test-utils) already use relative patterns and served as the reference for the fix.

Additional context

Key things for reviewers to verify:

  • The packages/tooling/jest/example/react-native-example/tsconfig.eslint.json file also had /*.js and /*.tsx patterns (not /**/*.js), which were changed to *.js and *.tsx — same root-cause fix, just a different glob shape.
  • This fix was validated on Linux where both patterns resolve identically. Ideally, a macOS spot-check of yarn workspace <pkg> lint on an affected package would confirm the fix on the platform where the bug manifests.

Link to Devin session: https://app.devin.ai/sessions/344742d82eb748be987668f194b42bb0
Requested by: @joker23


Note

Low Risk
Low risk config-only change that adjusts TypeScript/ESLint file include globs; main risk is unintentionally widening or narrowing linted file sets in affected packages.

Overview
Fixes broken tsconfig.eslint.json include patterns across the monorepo by removing leading / so globs are resolved relative to each package (e.g. /**/*.ts**/*.ts, similarly for tsx/js).

This should prevent ESLint parserOptions.project parsing errors on platforms where rooted include globs fail to match project files (notably macOS), and slightly normalizes include behavior in the Jest react-native example (/*.js*.js).

Reviewed by Cursor Bugbot for commit ad9cc96. Bugbot is set up for automated code reviews on this repo. Configure here.


Open with Devin

Replace absolute glob patterns (/**/*.ts) with relative patterns (**/*.ts)
in 24 tsconfig.eslint.json files. The leading / caused the include pattern
to be resolved from the filesystem root instead of relative to the project
directory, which produced platform-dependent ESLint parsing errors on macOS.

Co-Authored-By: Steven Zhang <szhang@launchdarkly.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@cursor review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25661 bytes
Compressed size limit: 29000
Uncompressed size: 126143 bytes

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179221 bytes
Compressed size limit: 200000
Uncompressed size: 830035 bytes

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31733 bytes
Compressed size limit: 34000
Uncompressed size: 112845 bytes

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 37166 bytes
Compressed size limit: 38000
Uncompressed size: 204365 bytes

@joker23
Copy link
Copy Markdown
Contributor Author

joker23 commented Apr 7, 2026

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2b8004f. Configure here.

@joker23 joker23 marked this pull request as ready for review April 7, 2026 17:28
@joker23 joker23 requested a review from a team as a code owner April 7, 2026 17:28
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@joker23 joker23 merged commit 0b32cb0 into main Apr 7, 2026
46 checks passed
@joker23 joker23 deleted the devin/1775571809-fix-tsconfig-eslint-include-paths branch April 7, 2026 21:30
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.

2 participants