JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 222
  • Score
    100M100P100Q79327F
  • License ISC

The AI static analysis tool

Package Exports

  • gptlint
  • gptlint/gptlint.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gptlint) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GPTLint

GPTLint is a powerful static analysis tool for JavaScript, TypeScript, and TSX files, leveraging the advanced capabilities of OpenAI's GPT-4 model. It provides insightful code reviews, highlights potential issues, and offers improvement suggestions with a focus on optimizing your codebase.

Features

  • Static analysis of JavaScript, TypeScript, and TSX files.
  • Utilizes GPT-4 to provide detailed and context-aware code analysis.
  • Supports analyzing individual files or entire directories.
  • Generates a comprehensive and easy-to-read HTML report.

Installation

Install GPTLint globally using npm:

npm install gptlint

Add your OpenAI key as an environment variable with this key: OPENAI_KEY

Usage

You can run GPTLint on an individual file or an entire directory. To use GPTLint, simply navigate to your project directory or the location of your file and run one of the following commands:

Analyzing a Directory

To analyze all JS, TS, and TSX files in a directory:

node .\node_modules\gptlint\gptlint.js /path/to/your/directory

Analyzing a Single File

To analyze a single file:

node .\node_modules\gptlint\gptlint.js /path/to/your/file.js

Output

GPTLint generates an report.html file in your current directory. This file contains a detailed report of the analysis, including suggestions and potential improvements for each file scanned.

Configuration

To use GPTLint, ensure you have an OpenAI API key. Set this key as an environment variable OPENAI_KEY before running GPTLint.

Contributions

Contributions to GPTLint are welcome! Please feel free to submit pull requests or open issues to discuss proposed changes or enhancements.