mdn / mdn/fred

push pre-commit hook attempts to lint untracked files

Open
#1,293 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
233
Forks
61
Avg merge
1d 1h
Merged PRs (30d)
82

Description

Often when switching between local branches I'll have untracked files in my git tree because the .gitignore ignoring these new directories is left in the other branch.

When pushing the pre-commit hook then attempts to lint all these files, which would be fine if it failed fast, but usually it fills my console with spam and locks up while it attempts to lint minified files.

We should ignore untracked files in the push pre-commit hook.

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 by locating the push pre-commit hook and reproduce the issue with untracked files, including a minified file, while switching branches with the relevant ignore rule absent. Done means the hook excludes untracked files from linting while preserving linting for tracked files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.