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>
Showing
| ... | ... | @@ -55,7 +55,7 @@ |
| "debug": "cross-env NEXT_TELEMETRY_DISABLED=1 node --inspect packages/next/dist/bin/next", | ||
| "postinstall": "node scripts/git-configure.mjs && node scripts/install-native.mjs", | ||
| "version": "pnpm install --no-frozen-lockfile && IS_PUBLISH=yes ./scripts/check-pre-compiled.sh && git add .", | ||
| "prepare": "husky install", | ||
| "prepare": "husky", | ||
| "sync-react": "node ./scripts/sync-react.js", | ||
| "update-google-fonts": "node ./scripts/update-google-fonts.js" | ||
| }, | ||
| ... | ... | @@ -159,7 +159,7 @@ |
| "gzip-size": "5.1.1", | ||
| "html-validator": "5.1.18", | ||
| "http-proxy": "1.18.1", | ||
| "husky": "8.0.0", | ||
| "husky": "9.0.11", | ||
| "image-size": "1.1.1", | ||
| "is-animated": "2.0.2", | ||
| "isomorphic-unfetch": "3.0.0", | ||
| ... | ... | @@ -172,7 +172,7 @@ |
| "ky": "0.19.1", | ||
| "ky-universal": "0.6.0", | ||
| "lerna": "4.0.0", | ||
| "lint-staged": "10.1.7", | ||
| "lint-staged": "15.2.2", | ||
| "lodash": "4.17.20", | ||
| "lost": "8.3.1", | ||
| "minimatch": "3.0.4", | ||
| ... | ... |
This diff is collapsed.
Please
register
or
sign in
to comment