Commit graph

3 commits

Author SHA1 Message Date
Jiwon Choi
0558f61c41
refactor: remove unnecessary lint-staged operations (#65861)
### Why?

The current `lint-staged` hook uses [function
signature](https://github.com/lint-staged/lint-staged?tab=readme-ov-file#function-signature)
to target the **staged files** and has extra steps for handling those
files that seem to have been passed on from a [5-year-old legacy
code](https://github.com/vercel/next.js/pull/9245).

The entire process is unnecessary today since `lint-staged` only runs on
the staged files.

### How?

This PR removed unnecessary logic, removed some no-effect flags, and
[removed `git
add`](https://github.com/lint-staged/lint-staged?tab=readme-ov-file#v10).

> If your task previously contained a git add step, please remove this.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-05-30 00:56:30 +00:00
Janka Uryga
7507f1b2e6
add pre-push hook to guard against accidental pushes directly to canary (#66030)
We allow users in the Next.js team to push directly canary in order to allow emergency fixes (and, AFAIU, some other things in GH workflows). This PR adds a guardrail to prevent absentminded people from doing it by accident, requiring a 'git push --no-verify' to bypass the hook.
2024-05-21 12:54:05 +02:00
JJ Kasper
9573174196
Replace pre-commit with husky (#38350)
* Replace pre-commit with husky

* update lock

* actually update lock
2022-07-06 11:14:16 -05:00