-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have searched the current rule list and found no rules that match my proposal.
- I have read the FAQ and my problem is not listed.
Relevant Package
typescript-estree
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
Previously, typescript-eslint switched from glob to globby for tsconfig.json file searching: #2418
Under the hood, globby is powered by fast-glob with extra features, but none of them are utilized by the typescript-eslint.
Since the typescript-eslint doesn't utilize those extra features, I propose replacing globby with fast-glob to reduce the installation size.
Additional Info
The installation size difference
The installation size of globby is 605 KiB and 23 transitive dependencies are introduced, while the installation size of fast-glob is 503 KiB and 18 transitive dependencies are introduced.
Proof of Concept
I've tested the proposal in my fork: SukkaW@0cec339 and all existing test cases are passed on my machine.
globby's extra features
Here is globby's feature description:
- Promise API
fast-globalso has promise-based API, andtypescript-eslintonly uses the sync API
- Multiple patterns
globby's multiple patterns support is powered byfast-globdirectly
- Negated patterns:
['foo*', '!foobar']globby's negated patterns support is also powered byfast-globdirectly
- Expands directories:
foo → foo/**/*typescript-eslintdoesn't rely on this feature since the exact matches oftsconfig.json(-like) files are required
- Supports
.gitignoreand similar ignore config filestypescript-eslintdoesn't rely on this feature sinceglobbydisabled this feature by default andtypescript-eslintdoesn't enable it.
- Supports URL as
cwd- Currently
typescript-eslintpassed the string path tocwd, and we can use Node.js built-inurl.fileURLToPathin case we encounter URLs in the future.
- Currently