Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-comment-length-2

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-comment-length-2

ESLint rules that limits the line length of your comments.

  • 0.5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-comment-length

ESLint rules that limits the line length of your comments.

This project aims to ease the process of writing long comments where each line needs to be cropped to a specific line length. Think of the eslint rule max-len with "comments" enabled while also having the benefit of auto-fixing issues.

The plugin is in its early stages and has only been tested with limited use cases. As such, the plugin will probably not work with comments "that matters" such as JSDoc comments.

NB: Rules will not apply to comments that are not on their own lines and comments that include the strings eslint-disable-* and stylelint-disable-* to avoid breaking functionality.

Installation

yarn add --dev eslint-plugin-comment-length

Usage

Add the following to your .eslintrc configuration:

{
  "extends": [
    "plugin:comment-length/recommended"
  ]
}

Rules

limit-single-line-comments

Locates single line commments, i.e. // comment, and ensures that each line never exceeds the configured length.

When a line has been exceeded then auto-fixes can be applied which will attempt to combine logical groups of single-line comments and reformatting these to ensure that each line is below the configured max length.

Only line-breaks are considered as splits.

limit-multi-line-comments

Locates multi line comments, i.e. /* comment */ and ensures that each line in the comment never exceeds the configured length.

Keywords

FAQs

Package last updated on 04 May 2022

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc