tooling
This commit is contained in:
7
.prettierignore
Normal file
7
.prettierignore
Normal file
@@ -0,0 +1,7 @@
|
||||
.devenv/
|
||||
.direnv/
|
||||
node_modules/
|
||||
result/
|
||||
package-lock.json
|
||||
docs/
|
||||
devenv.yaml
|
||||
6
.prettierrc.json
Normal file
6
.prettierrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"printWidth": 100
|
||||
}
|
||||
@@ -6,9 +6,15 @@
|
||||
}: {
|
||||
# https://devenv.sh/packages/
|
||||
packages = with pkgs; [
|
||||
guile
|
||||
just
|
||||
# Nix code formatter
|
||||
alejandra
|
||||
# TypeScript tooling
|
||||
nodePackages.typescript
|
||||
nodePackages.typescript-language-server
|
||||
# JavaScript/TypeScript formatter
|
||||
nodePackages.prettier
|
||||
];
|
||||
|
||||
# https://devenv.sh/languages/
|
||||
@@ -25,6 +31,7 @@
|
||||
# https://devenv.sh/pre-commit-hooks/
|
||||
git-hooks.hooks = {
|
||||
alejandra.enable = true;
|
||||
prettier.enable = true;
|
||||
check-added-large-files = {
|
||||
enable = true;
|
||||
args = ["--maxkb=16384"];
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@mariozechner/pi-coding-agent": "^0.65.0"
|
||||
},
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit",
|
||||
"format": "prettier . --write",
|
||||
"format:check": "prettier . --check"
|
||||
}
|
||||
}
|
||||
|
||||
1
src/index.ts
Normal file
1
src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const hello = (name: string): string => `Hello, ${name}!`;
|
||||
13
tsconfig.json
Normal file
13
tsconfig.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipLibCheck": true,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src/**/*.ts", "scripts/**/*.ts", "*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user