Commit 0b32cb0
chore: fix broken tsconfig.eslint.json include paths across monorepo (#1249)
**Requirements**
- [x] I have added test coverage for new or changed functionality
- [x] I have followed the repository's [pull request submission
guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
- [x] 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](https://launchdarkly.atlassian.net/browse/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
[SDK-2137]:
https://launchdarkly.atlassian.net/browse/SDK-2137?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!-- CURSOR_SUMMARY -->
---
> [!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`).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ad9cc96. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/launchdarkly/js-core/pull/1249"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 2ca1c62 commit 0b32cb0
24 files changed
Lines changed: 24 additions & 24 deletions
File tree
- packages
- sdk
- akamai-base
- akamai-edgekv
- browser
- contract-tests/entity
- cloudflare
- combined-browser
- electron
- fastly
- react-native
- shopify-oxygen
- svelte
- vercel
- examples/route-handler
- store
- node-server-sdk-dynamodb
- node-server-sdk-redis
- telemetry
- browser-telemetry
- node-server-sdk-otel
- tooling/jest
- example/react-native-example
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
0 commit comments