3.0.2 • Published 2 months ago

pneulint v3.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

Caution! Project is in development status - use at your own risk

PneuLint

PneuLint is a static code analysis tool designed to enhance your coding practices by meticulously analyzing your JavaScript and TypeScript files. With PneuLint, ensure your code adheres to best practices and maintain a high standard of quality across your projects.

Version

3.0.2

Installation

PneuLint is easy to install globally via npm, allowing you to run it from anywhere in your terminal.

npm install -g pneulint

Usage

Once installed, you can run PneuLint on any directory or file to perform a comprehensive linting process. Simply navigate to your project directory in the terminal and execute the following command:

pneulint [path]

Replace path with the path to the directory or file you wish to lint. If no path is provided, PneuLint will default to linting files in the current directory.

Examples

  • Lint all files in the current directory:
pneulint
  • Lint all files in a specific directory:
pneulint path/to/directory
  • Lint a specific file:
pneulint path/to/file.js
  • Lint with complexity parameter:
pneulint path/to/file.js -c 42

Complexity

    const nodeWeights = {
        'FunctionDeclaration': 1.2,
        'ArrowFunctionExpression': 1.2,
        'FunctionExpression': 1.2,
        'ForStatement': 1.3,
        'ForInStatement': 1.3,
        'ForOfStatement': 1.3,
        'WhileStatement': 1.3,
        'DoWhileStatement': 1.3,
        'IfStatement': 1.1,
        'SwitchStatement': 1.2,
        'TryStatement': 1.5,
        'CatchClause': 1.4,
        'LogicalExpression': 1.1,
        'ConditionalExpression': 1.1,
        'ClassDeclaration': 1.3,
        'MethodDefinition': 1.2,
        'NewExpression': 1.3,
        'CallExpression': 1.1,
    };

Features

  • Supports both JavaScript (.js) and TypeScript (.ts) files.
  • Recursively lints directories to ensure all files are analyzed.
  • Customizable path selection to lint specific files or directories.

License

This project is licensed under the ISC License