eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

comment-spacing

ESLint plugin / comment-spacing

Requires consistent empty lines around comments.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/comment-spacing": "error"
  }
};

Examples of incorrect code

// Comment
function f() {}

/** Comment */
function g() {}

/*
Comment
*/

function h() {}

Examples of correct code

// Comment

function f() {}

/** Comment */

function g() {}

/*
Comment
*/
function h() {}