npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

saz-enforce

v2.2.0

Published

Enterprise React/Next.js code enforcement — ESLint, Tailwind, TypeScript configs + security scan, auto-fix, scoring, CI/CD, hooks by Muhammad Salman

Readme

saz-enforce

Enterprise code enforcement for React & Next.js — by Muhammad Salman

npm license

106 rules | security scanner | auto-fix | project scoring | watch mode | CI integration | zero runtime deps


Install & Init

npm install saz-enforce
npx saz init

Also works as npx saz-enforce init. Asks 8 questions and scaffolds everything:

| Question | Options | |----------|---------| | Team | Full Stack / Frontend / Backend | | Framework | React / Next.js | | Language | JavaScript / TypeScript | | Typography | Standardized / Design Patterns / Both | | Animations | No / Yes (opt-in via data-animate) | | Kafka | No / Yes → if yes: backend ready or dev mode? | | i18n | No / Yes (en + ar + RTL) | | Theme | No / Event-based / Static multi / Both |

For existing projects:

npx saz audit              # read-only compatibility report
npx saz baseline            # freeze current violations for CI

CLI Commands

npx saz check               # interactive audit
npx saz check --report      # CI mode (no prompts)
npx saz check --fix-all     # auto-fix all
npx saz check --baseline    # only new violations
npx saz check --changed     # only changed files
npx saz fix                 # auto-fix + ESLint + Prettier
npx saz watch               # scan on save
npx saz security            # security vulnerability scan
npx saz score               # grade A+ to F across 10 categories
npx saz rules               # list all 106 rules
npx saz arch                # validate project architecture
npx saz hooks               # install pre-commit hooks
npx saz ci --github          # generate CI workflow
npx saz doctor              # detect version drift
npx saz eject <target>      # copy config as standalone file
npx saz info                # show project config

Config Files

// .eslintrc.js (JS)
module.exports = require("saz-enforce/configs/eslint");

// .eslintrc.js (TS)
module.exports = require("saz-enforce/configs/eslint-ts");

// tailwind.config.js
module.exports = { presets: [require("saz-enforce/configs/tailwind")] };

// tsconfig.json
{ "extends": "saz-enforce/configs/tsconfig.json" }

Auto-adapts to ESLint 8/9, TypeScript-ESLint v6/7/8, Tailwind v3/v4.


What's Enforced — 106 Rules

| Category | Rules | Examples | |----------|-------|---------| | Code Quality | 21 | No var, no debugger, strict equality, no magic numbers | | Type Safety | 12 | No any, no as assertions, use ?? over \|\| | | CSS / Tailwind | 7 | No inline styles, no raw colors, no !important | | Security | 16 | No eval, no localStorage tokens, no dangerouslySetInnerHTML | | React Patterns | 12 | No array index keys, no inline handlers, no nested components | | Performance | 7 | No sync fs, no moment.js, no full lodash import | | Accessibility | 9 | alt on images, labels on inputs, rem not px | | Data Fetching | 5 | Use axios instance, no hardcoded URLs | | Design Lint | 8 | No raw Tailwind colors, deprecated tokens, focus-visible | | HTML5 Semantic | 10 | Use <dialog>, <nav>, <header>, <time> |


Optional Features

Design Patterns (Q3)

14-token typography scale, HSL colors, responsive breakpoints, lucide-react icons, landing page template.

Animations (Q4)

Opt-in via data-animate on <html>. 11 CSS keyframes + RevealSection, StaggerGrid, TiltCard components. Graceful degradation without framer-motion.

Kafka Queue (Q5)

createQueueThunk replaces createAsyncThunk for mutations. Queue lifecycle state, GlobalMessageBar UI, dev simulator, WebSocket placeholder for production. If your backend isn't Kafka-ready yet, choose dev mode — the simulator fakes queue events locally so you can build the frontend first.

BMAD Agents (Q6)

7 AI agents (Analyst, Architect, PM, Dev, QA, SM, UX) + MCP config for Claude Code/Cursor/Windsurf.

i18n (Q7)

i18next + react-i18next + RTL support. English + Arabic translations, LanguageSwitcher component, useFormattedDate hook.

Theme System (Q8)

Event-based (system preference auto-switch) and/or static multi-theme (5 themes: Light, Dark, Ocean, Forest, Sunset). ThemeProvider, useTheme, ThemeModeSwitcher, ThemeSwitcher.


Custom Rules & Overrides

// saz.rules.js — add project-specific rules
module.exports = [
  { id: "no-moment", description: "Use date-fns", severity: "error",
    test: (line) => /\bmoment\s*\(/.test(line) },
];
// saz.config.json — override severity
{ "rules": { "no-console": "off", "no-any": "warning" } }
// saz-ignore sec-eval-usage
const x = eval(code); // suppress specific rule

CI Integration

npx saz ci --github             # generate workflow
npx saz check --report          # zero-tolerance (new projects)
npx saz check --baseline --report  # incremental (existing projects)
npx saz check --report --max-warnings 10  # warning threshold

Requirements

  • Node.js >=16.0.0 | Zero runtime deps
  • Skip postinstall: SAZ_SKIP_POSTINSTALL=1 npm install

Author

Muhammad SalmanGitHub | npm

MIT License