Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pnpm build check test
#!/bin/sh

pnpx lint-staged --config .lintstagedrc.commit.js
3 changes: 3 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

pnpx lint-staged --config .lintstagedrc.push.js
6 changes: 6 additions & 0 deletions .lintstagedrc.commit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
"**/*.{js,ts,json}": (filenames) =>
filenames.length ? [`biome check --write ${filenames.join(" ")}`] : [],
"!(**/*.{js,ts,json})": (filenames) =>
filenames.length ? [`prettier --write ${filenames.join(" ")}`] : [],
};
3 changes: 3 additions & 0 deletions .lintstagedrc.push.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
"*": (filenames) => (filenames.length >= 5 ? ["pnpm build check test"] : []),
};
Comment on lines +2 to +3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider whether this conditional execution is the desired behavior. It might be better to always run the tests, or to have a more sophisticated criteria for when to run them. What is the rationale for only running tests when there are 5 or more files?

Suggested change
"*": (filenames) => (filenames.length >= 5 ? ["pnpm build check test"] : []),
};
"*": (filenames) => ["pnpm build check test"],

3 changes: 3 additions & 0 deletions .pretter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignoreUnknown": true
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/generated**
**/*.{js,ts,json}
.husky/**
.prettierignore
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"biomejs.biome",
"google.geminicodeassist"
]
}
31 changes: 20 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"windsurf.cascadeCommandsAllowList": [
"pnpm test",
"pnpm build",
"pnpm build check test",
"pnpm format",
"cd"
]
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"windsurf.cascadeCommandsAllowList": [
"pnpm test",
"pnpm build",
"pnpm build check test",
"pnpm format",
"cd"
],
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
Comment on lines +2 to +21

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The indentation in this file is inconsistent. Some lines use tabs while others use spaces. Consider using a consistent indentation style (e.g., two spaces) for better readability.

{
	"editor.defaultFormatter": "esbenp.prettier-vscode",
	"[javascript]": {
		"editor.defaultFormatter": "biomejs.biome"
	},
	"[typescript]": {
		"editor.defaultFormatter": "biomejs.biome"
	},
	"[json]": {
		"editor.defaultFormatter": "biomejs.biome"
	},
	"windsurf.cascadeCommandsAllowList": [
		"pnpm test",
		"pnpm build",
		"pnpm build check test",
		"pnpm format",
		"cd"
	],
	"[shellscript]": {
		"editor.defaultFormatter": "foxundermoon.shell-format"
	}
}

}
21 changes: 21 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"files": {
"include": ["**/*.js", "**/*.ts", "**/*.json"],
"ignore": ["**/package.json"]
},
"javascript": {
"formatter": {
"semicolons": "always"
}
}
}
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@
"test": "turbo run test",
"check": "turbo run check",
"release": "turbo run build && pnpm publish -r",
"prepare": "husky install"
"prepare": "husky install",
"format:biome": "biome check --write .",
"format:prettier": "prettier --write .",
"format": "pnpm format:prettier && pnpm format:biome",
"lint:biome": "biome check .",
"lint:prettier": "prettier --check .",
"lint": "pnpm lint:prettier && pnpm lint:biome"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@changesets/cli": "^2.28.1",
"husky": "^9.1.7",
"prettier": "^3.5.3",
"lint-staged": "^15.5.0",
"prettier": "^3.4.2",
"turbo": "^2.4.4",
"typescript": "5.8.2"
},
Expand All @@ -26,5 +34,6 @@
"onlyBuiltDependencies": [
"esbuild"
]
}
},
"type": "module"
}
Loading