OpenFn / OpenFn/kit

Compiler: add a validator

Open
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

The compiler should have the ability to validate job code and report any errors it finds. This could be implemented as eslint rules, or just our own validation which runs against the parsed AST.

This could be run as a pre-flight check by a runtime manager, or be used in lightning to give feedback to job authors at dev time.

Validation issues could include:

  • Catching invalid/disallowed imports
  • Warning about nested operations (ie, we want to encourage many top level operations or "magic functions" so that we can report on them more effectively)
  • Catch common usage errors with adaptor functions (ie, passing state directly without wrapping it in an arrow)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or concrete entry points are named. Start by locating the TypeScript compiler and its parsed-AST flow, then clarify whether validation should use ESLint rules or an internal validator and which checks are in scope. Done should mean the agreed validation rules report the specified job-code errors for authors or the runtime manager.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.