Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[hook "nano-staged"]
event = pre-commit
command = pnpm exec nano-staged
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/.husky
packages/*/.astro
packages/*/dist
packages/*/lib
Expand Down
3 changes: 3 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export default {
ignoreDependencies: [
// The changesets CLI isn't directly referenced anywhere, but we need it to create new changesets.
"@changesets/cli",

// Invoked by the Git hook configured in .gitconfig.
"nano-staged",
],
project: ["*.config.{js,ts}", "scripts/**/*.ts"],
},
Expand Down
4 changes: 0 additions & 4 deletions lint-staged.config.ts

This file was deleted.

4 changes: 4 additions & 0 deletions nano-staged.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*": "prettier --ignore-unknown --write",
".changeset/*.md": "node scripts/validate-changesets.ts"
}
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lint": "eslint . --max-warnings 0",
"lint:knip": "knip",
"lint:knip:prod": "knip --strict",
"prepare": "husky",
"prepare": "node scripts/use-tracked-config.ts",
"release": "pnpm build && pnpm -r publish",
"start:site": "pnpm --filter=site prebuild && pnpm --filter=site start",
"test": "vitest"
Expand Down Expand Up @@ -55,10 +55,9 @@
"eslint-plugin-regexp": "catalog:dev",
"eslint-plugin-yml": "catalog:dev",
"flint": "workspace:^",
"husky": "catalog:dev",
"jiti": "catalog:dev",
"knip": "catalog:dev",
"lint-staged": "catalog:dev",
"nano-staged": "catalog:dev",
"prettier": "catalog:dev",
"prettier-plugin-astro": "catalog:dev",
"prettier-plugin-curly": "catalog:dev",
Expand Down
49 changes: 12 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ catalogs:
eslint-plugin-regexp: 3.1.0
eslint-plugin-yml: 3.4.0
execa: 9.6.1
husky: 9.1.7
jiti: 2.7.0
knip: 6.32.0
lint-staged: 17.3.0
nano-staged: 1.0.2
prettier: 3.8.1
prettier-plugin-astro: 0.14.1
prettier-plugin-curly: 0.4.1
Expand Down
14 changes: 14 additions & 0 deletions scripts/use-tracked-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { execFile } from "node:child_process";
import path from "node:path";
import { promisify } from "node:util";

const execFileAsync = promisify(execFile);

await execFileAsync("git", [
"-C",
path.resolve(import.meta.dirname, ".."),
"config",
"--local",
"include.path",
"../.gitconfig",
]);