🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@shined/doctor

Package Overview
Dependencies
Maintainers
4
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shined/doctor

[![npm version](https://badge.fury.io/js/@shined/doctor.svg)](https://badge.fury.io/js/@shined/doctor) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
4
Created
Source

Doctor Engine

npm version License: MIT

A high-performance code quality inspection tool powered by Rust and Node.js.

Features

  • 🚀 High Performance: Built with Rust for maximum speed and efficiency
  • 🔍 Comprehensive Analysis: Supports multiple programming languages and frameworks
  • Parallel Processing: Utilizes multi-threading for faster code scanning

Installation

npm install @shined/doctor
# or
yarn add @shined/doctor
# or
pnpm add @shined/doctor

Quick Start

import { Standards } from "@shined/doctor";

// Initialize Standards checker
const standards = Standards.create(process.cwd());

// Run all validations
const results = await standards.validateAll({
  withDashboard: true,
  quiet: false,
});

Configuration

Create a .sfconfig/spec.json file in your project root:

{
  "globals": {
    "yourGlobalVar": "writable"
  },
  "ignore": ["**/node_modules/**", "**/dist/**", "**/build/**", "**/target/**"]
}

The tool will also check for:

  • .npmrc - NPM registry configuration
  • .node-version - Node.js version specification
  • package.json - Package configuration

CLI Usage

# Install globally
npm install -g @shined/doctor

# Run analysis on current directory
npx @shined/doctor

# Run with verbose output
npx @shined/doctor --verbose

# Run with custom working directory
npx @shined/doctor --cwd /path/to/project

# Show help
npx @shined/doctor --help

The command will:

  • Check project health
  • Show error count if any errors are found
  • Display execution time
  • Exit with code 1 if errors are found

API Reference

Class: Standards

Main class for code quality validation.

Static Methods

  • create(cwd: string): Standards - Create a new Standards instance

Instance Methods

  • validateNpmrc(): Promise<Array<Messages>> - Validate npmrc configuration
  • validateNodeVersion(): Promise<Array<Messages>> - Validate Node.js version
  • validatePackageJson(): Promise<Array<Messages>> - Validate package.json
  • validateLint(): Promise<Array<Messages>> - Run linting validation
  • validateAll(opts?: RenderOpts): Promise<Array<Messages>> - Run all validations

RenderOpts Interface

OptionTypeDescription
withDashboardbooleanEnable dashboard view
maxRenderCountnumberMaximum items to render
quietbooleanSuppress output

Utility Functions

Code Statistics

function cloc(paths: string[], opts?: { ignore?: string[] }): LanguageStats[];

Debug Functions

function initializeLogger(level?: LogLevel): void;
function unSafeInnerLint(
  globArgs: GlobArgs,
  category: NaPiCategory
): Promise<Diagnostic[]>;

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT © [Your Name]

Support

  • Documentation: [Link to docs]
  • Issues: [GitHub Issues]
  • Discord: [Discord Channel]

Acknowledgments

Built with:

FAQs

Package last updated on 16 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts