eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

sort-top-comments

ESLint plugin / sort-top-comments

Sorts top comments.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/sort-top-comments": "error"
  }
};

Examples of incorrect code

// Comment 4
// Comment 3
/* Comment 2 */
/* Comment 1 */

Examples of correct code

/* Comment 1 */
/* Comment 2 */
// Comment 3
// Comment 4