Files
livedash-node/eslint.config.mjs
Kaj Kowalski bde0b44ea0 feat: Add authentication and session management with NextAuth.js and Prisma [broken]
- Implemented API session retrieval in `lib/api-auth.ts` to manage user sessions.
- Created authentication options in `lib/auth-options.ts` using NextAuth.js with credentials provider.
- Added migration scripts to create necessary tables for authentication in `migrations/0002_create_auth_tables.sql` and `prisma/migrations/20250601033219_add_nextauth_tables/migration.sql`.
- Configured ESLint with Next.js and TypeScript support in `eslint.config.mjs`.
- Updated Next.js configuration in `next.config.ts` for Cloudflare compatibility.
- Defined Cloudflare Worker configuration in `open-next.config.ts` and `wrangler.jsonc`.
- Enhanced type definitions for authentication in `types/auth.d.ts`.
- Created a Cloudflare Worker entry point in `src/index.ts.backup` to handle API requests and responses.
2025-06-01 16:34:54 +02:00

58 lines
1.4 KiB
JavaScript

import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
];
export default eslintConfig;
// import js from "@eslint/js";
// import { FlatCompat } from "@eslint/eslintrc";
// import path from "path";
// import { fileURLToPath } from "url";
// const __filename = fileURLToPath(import.meta.url);
// const __dirname = path.dirname(__filename);
// const compat = new FlatCompat({
// baseDirectory: __dirname,
// });
// const eslintConfig = [
// js.configs.recommended,
// ...compat.extends(
// "next/core-web-vitals",
// "plugin:@typescript-eslint/recommended"
// ),
// {
// ignores: [
// "node_modules/",
// ".next/",
// ".vscode/",
// "out/",
// "build/",
// "dist/",
// "coverage/",
// ],
// rules: {
// "@typescript-eslint/no-explicit-any": "warn",
// "@typescript-eslint/no-unused-vars": "warn",
// "react/no-unescaped-entities": "warn",
// "no-console": "off",
// "no-trailing-spaces": "warn",
// "prefer-const": "error",
// "no-unused-vars": "warn",
// },
// },
// ];
// export default eslintConfig;