sindresorhus/eslint-plugin-unicorn
Rule proposal: `prefer-process-cwd`
クローズ
#2,651 opened on 2025/05/09
help wantednew rule
Repository metrics
- Stars
- (5,022 個のスター)
- PR merge metrics
- (平均マージ 1d 16h) (30d で 399 merged PRs)
説明
Description
Prefer process.cwd() over path.resolve().
The results are the same, but process.cwd() is faster and has a clear intention.
Examples
// ❌
path.resolve()
// ✅
process.cwd()
Proposed rule name
prefer-process-cwd
Additional Info
I didn't use this pattern, but I found quite a lot of usage on GitHub.