Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread 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 fromglob
toglobby
fortsconfig.json
file searching:#2418
Under the hood,globby
is powered byfast-glob
with extra features, but none of them are utilized by thetypescript-eslint
.
Since thetypescript-eslint
doesn't utilize those extra features, I propose replacingglobby
withfast-glob
to reduce the installation size.
Additional Info
The installation size difference
The installation size ofglobby
is 605 KiB and 23 transitive dependencies are introduced, whilethe installation size offast-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