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

format-javascript-comment

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

format-javascript-comment

Format your JavaScript comments

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source

Format JavaScript comment for Atom

Reformats your multiline comments into beautiful, maximum 80 character long lines, with no gaps or irregularities. ✨

What?

Turns this:

// Lorem ipsum dolor sit amet, consectetur
// adipisicing elit, sed do eiusmod tempor incididunt ut labore
// et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in.

Into this:

// Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
// tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
// quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
// consequat. Duis aute irure dolor in.

Why?

It's easy to format your comments correctly while writing them. But if you edit them later, it's annoying to reformat them.

How?

  1. Install format-javascript-comment (either through the package manager or through apm install format-javascript-comment).
  2. (Partially) select the lines the comment encompasses.
  3. Open command pallette (Cmd+Shift+P) and (partially) type "format comment".
  4. Press enter.

Features

  • Single line comments (// Whatever)
  • Multiline comments (* Whatever)
  • JSDoc tags always start on a new line ( * @param {string} name Some description.)

TODO

  • Better way to find the selection automatically if no selection is provided
  • Distribute words consistently across lines
  • Configurable line length

FAQs

Package last updated on 23 Apr 2016

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