Implements P0-003: shared database package with Drizzle ORM. Schema: 13 tables across 3 domains: - Auth (BetterAuth-compatible): users, sessions, accounts, verifications - Brain: projects, missions, tasks, events, agents, tickets, appreciations - Chat: conversations, messages Features: - createDb() factory with pool cleanup via DbHandle.close() - runMigrations() with try/finally for connection safety - drizzle-kit config for generate/push/migrate/studio - Full FK relationships and indexes on query-hot columns - ESM package with NodeNext resolution Verified: schema pushed to PG 17, CRUD round-trip tested. Closes #3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
770 B
JavaScript
33 lines
770 B
JavaScript
import tseslint from 'typescript-eslint';
|
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: [
|
|
'**/dist/**',
|
|
'**/node_modules/**',
|
|
'**/.next/**',
|
|
'**/coverage/**',
|
|
'**/drizzle.config.ts',
|
|
],
|
|
},
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
plugins: {
|
|
'@typescript-eslint': tsPlugin,
|
|
},
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
projectService: true,
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
},
|
|
},
|
|
);
|