eslint-plugin-typeorm-enterprise

Stops raw SQL before it reaches production, at lint time rather than at review.

eslint-plugin-typeorm-enterprise

ESLint & oxlint plugin for TypeORM: block raw SQL, prevent SQL injection, enforce transactions, guard multi-tenant queries, and apply enterprise backend governance.

npm versionnpm downloadsinstall sizetypes includedLicense: MITESLint 9+Node >=18TypeScript 5TypeScript 6TypeScript 7JavaScriptCICodeQLPublishcodecov
2,064 downloads 14/week v2.3.4 published 19 Aug 2026 MIT licence Node >=18 eslint 9 · 10 TypeScript
$ npm i -D eslint-plugin-typeorm-enterprise
eslintoxlinttypeormsql-injectionmulti-tenantgovernancesecuritynestjs

Raw and string-built SQL scattered through a TypeORM codebase is both a security problem and a governance one: it walks around the query builder, opens the door to injection, and splits data access into as many patterns as there are developers.

This catches those patterns before review and before merge, while staying conservative enough not to fire on ordinary request and router code. It ships compiled JavaScript with bundled type definitions, so it works on any TypeScript version, or on none.

What it catches

Using it

Install

npm i -D eslint eslint-plugin-typeorm-enterprise

Flat config, ESLint 9+

const typeormEnterprise = require('eslint-plugin-typeorm-enterprise');

module.exports = [typeormEnterprise.configs.recommended];

Questions

Do I need TypeScript to use it?

No. The package ships compiled JavaScript and bundled type definitions, so it runs on any TypeScript version or on a plain JavaScript project.

Will it fire on my existing code?

The rules are written to stay quiet on ordinary request and router code, and the shipped configs come in tiers. Start on recommended, move to strict once that is green, and add performance or multiTenant when they apply.

Does it work with oxlint?

Yes, through the oxlint JS-plugin API, as well as ESLint 9 and 10 flat config.

Also published