Conversation
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 EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
@cursor review |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@cursor review |
There was a problem hiding this comment.
✅ 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.
Requirements
Related issues
SDK-2137
Describe the solution you've provided
24
tsconfig.eslint.jsonfiles across the monorepo used"include": ["/**/*.ts"]with a leading/. This made the glob pattern a rooted path, causing TypeScript'smatchFilesto 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 withParsing 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:
packages/tooling/jest/example/react-native-example/tsconfig.eslint.jsonfile also had/*.jsand/*.tsxpatterns (not/**/*.js), which were changed to*.jsand*.tsx— same root-cause fix, just a different glob shape.yarn workspace <pkg> linton 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.jsonincludepatterns across the monorepo by removing leading/so globs are resolved relative to each package (e.g./**/*.ts→**/*.ts, similarly fortsx/js).This should prevent ESLint
parserOptions.projectparsing 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.