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-glob
also has promise-based API, andtypescript-eslint
only uses the sync API
- Multiple patterns
globby
's multiple patterns support is powered byfast-glob
directly
- Negated patterns:
['foo*', '!foobar']
globby
's negated patterns support is also powered byfast-glob
directly
- Expands directories:
foo → foo/**/*
typescript-eslint
doesn't rely on this feature since the exact matches oftsconfig.json
(-like) files are required
- Supports
.gitignore
and similar ignore config filestypescript-eslint
doesn't rely on this feature sinceglobby
disabled this feature by default andtypescript-eslint
doesn't enable it.
- Supports URL as
cwd
- Currently
typescript-eslint
passed the string path tocwd
, and we can use Node.js built-inurl.fileURLToPath
in case we encounter URLs in the future.
- Currently