UNPKG

pneulint

Version:

Static code analysis tool for better code

82 lines (62 loc) 2.17 kB
# <span style="color: red;">Caution! Project is in development status - use at your own risk</span> # 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. ```bash 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: ```bash 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: ```bash pneulint ``` * Lint all files in a specific directory: ```bash pneulint path/to/directory ``` * Lint a specific file: ```bash pneulint path/to/file.js ``` * Lint with complexity parameter: ```bash pneulint path/to/file.js -c 42 ``` ## Complexity ```javascript 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