Welcome

Pulsar — a static analyzer for TypeScript ORM code

Pulsar is a static analysis tool that catches bugs, performance issues, and schema mismatches in your TypeScript ORM code — before they reach production.

Installation

curl -L https://github.com/CarlosEduJs/pulsar/releases/latest/download/pulsar-cli-x86_64-unknown-linux-gnu.tar.xz | tar xJ
sudo mv pulsar /usr/local/bin/
pulsar check src/

Why Pulsar?

ORMs make database access convenient, but they also hide the SQL underneath. It's easy to write queries that look correct but hide performance traps, miss edge cases, or drift from your schema.

Pulsar bridges the gap — it understands both your TypeScript code and your database schema, so it can catch issues that generic linters miss.

What it catches

src/db/users.ts:12:20  error  no-select-star  Avoid implicit SELECT *. Specify columns explicitly.

  const user = await db.select().from(users);
                     ^^^^^^^^^^^^^^^^^^^^^^^

src/db/users.ts:15:20  warning  no-missing-limit  Query is missing a LIMIT clause.

  const users = await db.select({ id: users.id }).from(users);
                                          ^^^^^^^^^^^^^^^^^^^^

src/db/posts.ts:8:20  error  no-unknown-column  Column `non_existent` selected in query but does not exist in schema table `posts`.

  const posts = await db.select({ non_existent: posts.non_existent }).from(posts);
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^

Feature highlights

Rule categories

CategoryRulesWhat they prevent
Qualityno-select-star, no-missing-limit, no-unbounded-findSloppy queries that return too much or miss filters
Correctnessno-always-true-where, no-missing-awaitLogic bugs that crash at runtime
Performanceno-query-in-loop, no-query-in-callback, no-n-plus-oneN+1 queries and unnecessary database round-trips
Securityno-raw-sql-dangerousSQL injection via interpolated raw queries
Schemano-unindexed-filter, no-unknown-column, no-missing-foreign-keyMismatches between code and database schema

Quick start

Install

curl -L https://github.com/CarlosEduJs/pulsar/releases/latest/download/pulsar-cli-x86_64-unknown-linux-gnu.tar.xz | tar xJ
sudo mv pulsar /usr/local/bin/

Check your code

pulsar check src/

Modern programming languages come with excellent compilers and linters, yet the persistence layer has largely been left behind — still depending on tests, benchmarks, and painful production surprises to surface problems. Pulsar was built to close that gap, treating TypeScript, ORMs, SQL, and schema not as separate concerns, but as parts of one unified program.

Last updated on

On this page