Socket
Book a DemoInstallSign in
Socket

eslint-plugin-param-inline-comments

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-param-inline-comments

## Description

0.2.4
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

eslint-plugin-param-inline-comments

Description

eslint-plugin-param-inline-comments is an ESLint plugin that enforces inline comments for function parameters. This helps to improve code readability and maintainability by ensuring that the purpose of each parameter is clearly documented.

Installation

To install the plugin, run:

npm install eslint-plugin-param-inline-comments --save-dev

Usage

Add param-inline-comments to the plugins section of your ESLint configuration file, and configure the rule:

module.exports = {
  plugins: [
    "param-inline-comments"
  ],
  rules: {
    "param-inline-comments/param-inline-comments": "warn"
  }
};

On the other hand, If you want to remove the comments added, use the no-param-inline-comments rule instead

    "param-inline-comments/no-param-inline-comments": "warn"

Example

Given the following code:

function test(a, b, c, d) {
  // function body
}

test(1, true, null, false);

The plugin will enforce the following change:

function test(a, b, c, d) {
  // function body
}

test(/* a */ 1, /* b */ true, /* c */ null, /* d */ false);

Contributing Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This README provides a clear and concise summary of the ESLint plugin, including installation and usage instructions, an example, and information on contributing and licensing.

Keywords

eslint

FAQs

Package last updated on 29 Oct 2024

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.