Firelaw is a TypeScript transpiler that lets you write type-safe and scalable Firestore Security Rules using TypeScript syntax. Version 0.0.0 is an initial release with rapid iteration. It differentiates by enabling full TypeScript type checking and IDE support for rules, reducing runtime errors compared to writing raw Firebase rules. The library compiles TypeScript to Firestore rules format, handling complex rule generation with type safety.
npm install firelawNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic Firelaw usage: writing a Firestore rule that allows read only if user is authenticated.
Watch for breaking changes in pre-1.0 releases.
Pin to specific version and test thoroughly.
Write rules in TypeScript files with .ts extension.
Review the list of supported functions and operators.
Use import { firelaw } from 'firelaw' and ensure your project is ESM (type: module in package.json or .mjs file).Use firelaw`...` (backtick template literal) instead of firelaw('...').No dependency data recorded yet.