Skip to content

Bug: Hidden (dot) directories aren't globbed in typescript-estree's projects globs #6306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
JoshuaKGoldberg opened this issue Jan 6, 2023 · 1 comment
Closed
4 tasks done
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. package: typescript-estree Issues related to @typescript-eslint/typescript-estree
Milestone

Comments

@JoshuaKGoldberg
Copy link
Member

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

When parserOptions.project includes a * wildcard, the call to globby doesn't include dot: true.

globSync([...globProjects, ...ignoreListInput], {
cwd: tsconfigRootDir,
}),

That means directories like .test won't have TSConfigs inside them found.

From this projects list:

project: [
  './examples/*/tsconfig.json',
  './examples/*/*/tsconfig.json',
  './packages/*/tsconfig.json',
  './tsconfig.eslint.json',
],

...and tsconfig.jsons at:

./examples/.test/ssg/tsconfig.json
./packages/next/tsconfig.json
./packages/react-query/tsconfig.json
./packages/server/tsconfig.json
./packages/client/tsconfig.json
./tsconfig.json
./tsconfig.eslint.json
/Users/josh/repos/repros/examples/.test/ssg/src/utils/trpc.ts
  0:0  error  Parsing error: ESLint was configured to run on `<tsconfigRootDir>/examples/.test/ssg/src/utils/trpc.ts` using `parserOptions.project`: 
- <tsconfigRootDir>/../../../../users/josh/repos/repros/tsconfig.eslint.json
- <tsconfigRootDir>/../../../../users/josh/repos/repros/packages/client/tsconfig.json
- <tsconfigRootDir>/../../../../users/josh/repos/repros/packages/next/tsconfig.json
- <tsconfigRootDir>/../../../../users/josh/repos/repros/packages/react-query/tsconfig.json
- <tsconfigRootDir>/../../../../users/josh/repos/repros/packages/server/tsconfig.json

We can see this in the wild with trpc/trpc#3390. Which is running out of memory in CI 🙃 but you can repro locally at trpc/trpc@3de2e91.

Reproduction Repository Link

https://github.com/JoshuaKGoldberg/repros/tree/b9f06eed94237ebd5a2180988f3ca084b2b6ad5c

Repro Steps

  1. clone the repo
  2. pnpm install
  3. pnpm lint

Alternately, running pnpm lint from examples/.test/ssg runs faster and also shows the issues.

Versions

package version
@typescript-eslint/eslint-plugin 5.48.0
@typescript-eslint/parser 5.48.0
@typescript-eslint/scope-manager 5.48.0
@typescript-eslint/typescript-estree 5.48.0
@typescript-eslint/type-utils 5.48.0
@typescript-eslint/utils 5.48.0
TypeScript 4.8.3
ESLint 8.30.0
node 18.7.0
@JoshuaKGoldberg JoshuaKGoldberg added bug Something isn't working triage Waiting for team members to take a look labels Jan 6, 2023
@bradzacher bradzacher added package: typescript-estree Issues related to @typescript-eslint/typescript-estree accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Jan 19, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title Bug: Hidden (dot) directories aren't globbed in typescript-estree's projects glos Bug: Hidden (dot) directories aren't globbed in typescript-estree's projects globs Feb 17, 2023
@JoshuaKGoldberg JoshuaKGoldberg added this to the 8.0.0 milestone Mar 17, 2024
@JoshuaKGoldberg
Copy link
Member Author

#8818 was merged into v8. ✅

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
@bradzacher bradzacher added the locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. label Apr 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. package: typescript-estree Issues related to @typescript-eslint/typescript-estree
Projects
None yet
Development

No branches or pull requests

2 participants