Skip to main content

npm2py-inspector

A zero-dependency static health checker for NPM, React, and TypeScript projects—written entirely in Python!

It reads your package.json, .tsx files, and tsconfig.json to flag common problems, such as missing lockfiles, usage of the any type in TypeScript, massive React components, and unpinned dependencies. It never imports or executes your JavaScript/TypeScript code.

$ npm2py-inspector ./my-react-app

ERROR    NPM001  package.json:1  No lockfile found. Always commit your package-lock.json or yarn.lock.
WARNING  TS001   src/App.tsx:42  Explicit 'any' type found. Use a more specific type or 'unknown'.
INFO     RCT001  src/Dashboard.tsx:1  Component file is 412 lines long. Consider breaking it into smaller sub-components.

Category scores:
  dependencies     90/100
  typescript       96/100
  react            99/100
  configuration   100/100

Overall score: 96/100  (1 error(s), 1 warning(s))

Features

  • Zero runtime dependencies. Only the Python standard library (ast, re, json, pathlib).
  • Static only. Files are read as text. Nothing is executed using Node.js.
  • Scored. Start at 100. Each error costs 10 points and each warning costs 4.
  • CI-friendly. Exit code 1 on errors, and --format json for machine-readable output.

Installation

Requires Python 3.9 or newer.

git clone https://github.com/mayuriphad/npm2py-inspector.git
cd npm2py-inspector
pip install .

Usage

npm2py-inspector [PATH]                    # scan a directory (default: .)
npm2py-inspector PATH --format json        # JSON output for tooling
npm2py-inspector PATH --fail-under 80      # CI gate on the overall score
npm2py-inspector --list-rules

License

MIT License Copyright (c) 2026 Mayuri

Metadata

Release files for npm2py-inspector 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for npm2py-inspector 0.1.0
File Size Uploaded
npm2py_inspector-0.1.0.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for npm2py-inspector 0.1.0
File Interpreter ABI Platform
npm2py_inspector-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / npm2py_inspector-0.1.0.tar.gz

Download URL npm2py_inspector-0.1.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
47c9f7e7ad3cb11a82494831b21f4e8a54346e7b3451975b0f4561a497adf565
BLAKE2b-256 checksum
How to use checksums
dc4f54aa8b2a306e6dc390bca8180769729705c20317bfcc551f5086823123fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / npm2py_inspector-0.1.0-py3-none-any.whl

Download URL npm2py_inspector-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af80effc87b8433a2d8d6f6a9487b7de4bd9b88ba41579b0cbe95b1530d2dffa
BLAKE2b-256 checksum
How to use checksums
5dc6bf468d758bec8ec2465cedf1bcdc6bcf912df8400b4664623f6df8d84578
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page