You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[UE5.7] fix(eslint): pin tsconfigRootDir so lint works from any CWD (#834) (#837)
* fix(eslint): pin tsconfigRootDir so lint works from any CWD (#834)
Each workspace's eslint.config.mjs set parserOptions.project to a
workspace-prefixed path (e.g. 'Common/tsconfig.cjs.json') on the
assumption that typescript-eslint resolves it relative to the repo
root. That assumption holds only for some versions of typescript-eslint
and breaks outright when lint is invoked with CWD = workspace dir —
which is exactly how .github/workflows/healthcheck-libraries.yml runs
it (working-directory: Common, etc.).
Pin parserOptions.tsconfigRootDir to import.meta.dirname so the
relative project path is always resolved against the eslint config
file's own directory, regardless of CWD or typescript-eslint version.
Drop the workspace prefix from project accordingly.
(cherry picked from commit 7aa1fe2)
* fix: rebuilt package-lock
* fix: fixing lint issues.
---------
Co-authored-by: mcottontensor <80377552+mcottontensor@users.noreply.github.com>
Co-authored-by: Matthew.Cotton <matt@tensorworks.com.au>
Make `npm run lint` work regardless of the directory it's invoked from. Each workspace's `eslint.config.mjs` now pins `parserOptions.tsconfigRootDir` to `import.meta.dirname`, so `parserOptions.project` resolves relative to the config file's own directory rather than whichever CWD `typescript-eslint` happens to pick by default. Previously the six workspace configs prefixed `project` with the workspace directory (e.g. `'Common/tsconfig.cjs.json'`), which only worked under one specific `typescript-eslint` version's resolution behavior and broke CI when run from within the workspace.
0 commit comments