build: add TypeScript + ESLint baseline (typecheck/lint/test scripts)

Root package.json (type: module), strict tsconfig with allowJs/checkJs:false for
gradual migration, flat ESLint config scoped to scripts/ + tests/. App untouched.
All three green: lint, typecheck, test 107/107.
This commit is contained in:
tommy0103
2026-07-08 16:42:08 +08:00
parent a32461b2ab
commit 33ec238c0c
4 changed files with 1025 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
// Flat ESLint config for the Obelisk root (Core + skill runtime + tests).
// Scope: the ESM sources under scripts/ and tests/. The Electron app has its own
// package and toolchain and is intentionally excluded (see docs/adr/0003).
// typescript-eslint is deferred to Phase 4, when the first .ts files land.
import js from '@eslint/js';
import globals from 'globals';
export default [
{
ignores: [
'node_modules/**',
'app/**',
'dist/**',
'release/**',
'.dev.docs/**',
'.obelisk/**',
'.claude/**',
],
},
js.configs.recommended,
{
files: ['**/*.{js,mjs}'],
languageOptions: {
ecmaVersion: 2023,
sourceType: 'module',
globals: { ...globals.node },
},
rules: {
// Empty catch is an intentional pattern here (best-effort JSON.parse etc.).
'no-empty': ['error', { allowEmptyCatch: true }],
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
},
},
];