Adde Biome formatter and linter

This commit is contained in:
2025-07-01 19:38:45 +02:00
parent 969660abc8
commit a859439353
4 changed files with 62 additions and 19 deletions

57
biome.jsonc Normal file
View File

@ -0,0 +1,57 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": ["./src/paraglide"],
"include": ["./src/**"]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"semicolons": "asNeeded",
"arrowParentheses": "asNeeded"
}
},
"overrides": [
{
"include": ["*.astro"],
"linter": {
"rules": {
"style": {
"useConst": "off",
"useImportType": "off"
}
}
}
},
{
"include": ["*.svelte"],
"linter": {
"rules": {
"style": {
"useConst": "off",
"useImportType": "off"
}
}
}
}
]
}

19
flake.lock generated
View File

@ -16,26 +16,9 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1751271578,
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
"nixpkgs": "nixpkgs"
}
}
},

View File

@ -25,6 +25,7 @@
pnpm
] ++ [
nodePackages.prettier
biome
];
shellHook = ''

View File

@ -10,7 +10,9 @@
"astro": "astro",
"type-check": "astro check",
"postinstall": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide",
"format": "prettier --write \"./src/**/*.{js,mjs,ts,astro,svelte,css,md,json}\"",
"format": "biome format --write .",
"lint": "biome lint --write .",
"lint:fix": "biome check --write .",
"watch-messages": "paraglide-js compile --watch --project ./project.inlang --outdir ./src/paraglide"
},
"dependencies": {