chore: ESLint, Prettier und Vitest einrichten (#001)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-17 19:43:50 +02:00
co-authored by Claude Opus 5
parent 2f8bab5721
commit 30a2da5e0a
7 changed files with 62 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
+5
View File
@@ -0,0 +1,5 @@
* text=auto eol=lf
*.sh text eol=lf
*.ico binary
*.png binary
*.pdf binary
+6
View File
@@ -0,0 +1,6 @@
.next
node_modules
coverage
docs
*.md
package-lock.json
+6
View File
@@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 110
}
+13
View File
@@ -0,0 +1,13 @@
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";
import prettier from "eslint-config-prettier/flat";
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
prettier,
globalIgnores([".next/**", "out/**", "build/**", "coverage/**", "next-env.d.ts"]),
]);
export default eslintConfig;
+8
View File
@@ -0,0 +1,8 @@
import { describe, expect, it } from "vitest";
import { APP_VERSION } from "@/lib/version";
describe("APP_VERSION", () => {
it("entspricht Semantic Versioning", () => {
expect(APP_VERSION).toMatch(/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/);
});
});
+12
View File
@@ -0,0 +1,12 @@
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
export default defineConfig({
resolve: {
alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) },
},
test: {
include: ["tests/**/*.test.ts", "src/**/*.test.ts"],
environment: "node",
},
});