kentcdodds / kentcdodds/kcd-scripts

lintstagedrc.js failes on Windows

Open
#70 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
JavaScript
Stars
889
Forks
205
PR merge metrics
No merged PRs in 30d

Description

  • node version: 10.10.0
  • npm (or yarn) version: 6.0.0

Relevant code or config

npm run precommit

Problem description:

I'm working on a fork of kcd-scripts for my own company's purposes and while testing the lintstagedrc.js file failes on Windows. Probably has to do with #8 or is very similar. I also noticed this when working on React-Testing-Library when I went to commit, again lintstagedrc.js fails.

Unfortunately I'm not versed enough in the fs and path operators to figure out how to change \ for /. Unless we write a dirty method to check for win32 and do a global replace on the path string, tranding slashes. But I don't know what other problems might arise from that.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lintstagedrc.js and run npm run precommit in a Windows environment using the reported Node 10.10.0 setup. Review the filesystem and path handling, with issue #8 as related context. Done means the precommit command completes successfully on Windows without the lintstagedrc.js failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.