Pivot @when/config, @when/db, and @when/jobs from source packages (exports -> src/*.ts, tsc --noEmit) to build packages that emit dist/ and are consumed as compiled JS + .d.ts. This drops the source-package baggage (tsx, bespoke bundler noExternal rules) in favor of standard tooling; the cost is a build-ordering step that CI and Docker will own. - tsconfig.base: declaration true. - per package: a tsconfig.build.json emits to dist/src (composite, outDir, rootDir) and excludes tests + fixtures; tsconfig.json stays noEmit and full-project for the editor and the build's type-check pass, so test type errors are still caught. build runs both passes. - exports -> dist/*.js + .d.ts; files -> dist/*; jobs adds a ./specs subpath so the producer can import contracts without the client. - relative imports across src gain .js extensions for emitted ESM. - config: generate the schema as src/schema.ts (was schema.d.ts) so it compiles into dist; build:assets copies config.schema.json into dist. - jobs: name the spec type via Workflow['spec'] (openworkflow does not re-export WorkflowSpec) so declaration emit succeeds (TS2883). - per-package .gitignore for dist/; root build:packages script.
21 lines
483 B
JavaScript
21 lines
483 B
JavaScript
import js from '@eslint/js';
|
|
import ts from 'typescript-eslint';
|
|
import prettier from 'eslint-config-prettier';
|
|
import globals from 'globals';
|
|
|
|
export default ts.config(
|
|
{ ignores: ['dist/', 'coverage/', 'src/schema.ts'] },
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
prettier,
|
|
{
|
|
languageOptions: { globals: { ...globals.node } },
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
|
|
]
|
|
}
|
|
}
|
|
);
|