Socket
Socket
Sign inDemoInstall

eslint-plugin-jsdoc

Package Overview
Dependencies
0
Maintainers
1
Versions
628
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-jsdoc


Version published
Maintainers
1
Created

Package description

What is eslint-plugin-jsdoc?

The eslint-plugin-jsdoc package is a plugin for ESLint that provides linting rules for JSDoc comments. JSDoc is a markup language used to annotate JavaScript source code files. Using eslint-plugin-jsdoc, developers can ensure that their JSDoc comments are consistent and follow best practices.

What are eslint-plugin-jsdoc's main functionalities?

Check alignment

Ensures that JSDoc blocks are aligned properly.

/* eslint jsdoc/check-alignment: "error" */
/**
 * Function description.
 *
 * @param {string} name - The name of the person.
 * @return {string} - The greeting message.
 */
function greet(name) {
  return `Hello, ${name}!`;
}

Check indentation

Ensures that JSDoc blocks have consistent indentation.

/* eslint jsdoc/check-indentation: "error" */
/**
 * Function description.
 *
 * @param {string} name - The name of the person.
 * @return {string} - The greeting message.
 */
function greet(name) {
  return `Hello, ${name}!`;
}

Check types

Validates JSDoc comments for type correctness.

/* eslint jsdoc/check-types: "error" */
/**
 * Function description.
 *
 * @param {String} name - The name of the person.
 * @return {String} - The greeting message.
 */
function greet(name) {
  return `Hello, ${name}!`;
}

Require JSDoc

Requires JSDoc comments for certain nodes in the code.

/* eslint jsdoc/require-jsdoc: "error" */
/**
 * Function description.
 */
function greet(name) {
  return `Hello, ${name}!`;
}

Other packages similar to eslint-plugin-jsdoc

Readme

Source

FAQs

Last updated on 17 Sep 2015

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc